Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(healall, 7, cmdtext);
- dcmd(armourall, 9, cmdtext);
- return 0;
- }
- dcmd_healall(playerid, params[])
- {
- for (new i = 0; i < MAX_PLAYERS; i++))
- {
- if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xAA3333AA,"You need to be level 1 to use this command!");
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- if(!IsPlayerAdmin(playerid)) return 0;
- new string[128];
- format(string, sizeof(string), "Admin %s has Healed all players!",pName);
- SendClientMessageToAll(0xFFFF00AA, string);
- SetPlayerHealth(i, 100.0);
- return 1;
- }
- }
- dcmd_armourall(playerid, params[])
- {
- for (new i = 0; i < MAX_PLAYERS; i++))
- {
- if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xAA3333AA, "You need to be level 1 to use this command!");
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- if(!IsPlayerAdmin(playerid)) return 0;
- new string[128];
- format(string, sizeof(string), "Admin %s has Healed all players!", pName);
- SendClientMessageToAll(0xFFFF00AA, string);
- SetPlayerArmour(i, 100.0)
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement