Advertisement
Peppery

healnarmour

Feb 25th, 2012
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1.  
  2. public OnPlayerCommandText(playerid, cmdtext[])
  3.  
  4. {
  5. dcmd(healall, 7, cmdtext);
  6. dcmd(armourall, 9, cmdtext);
  7. return 0;
  8. }
  9.  
  10. dcmd_healall(playerid, params[])
  11. {
  12. for (new i = 0; i < MAX_PLAYERS; i++))
  13. {
  14. if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xAA3333AA,"You need to be level 1 to use this command!");
  15. new pName[MAX_PLAYER_NAME];
  16. GetPlayerName(playerid, pName, sizeof(pName));
  17. if(!IsPlayerAdmin(playerid)) return 0;
  18. new string[128];
  19. format(string, sizeof(string), "Admin %s has Healed all players!",pName);
  20. SendClientMessageToAll(0xFFFF00AA, string);
  21. SetPlayerHealth(i, 100.0);
  22. return 1;
  23. }
  24. }
  25. dcmd_armourall(playerid, params[])
  26. {
  27. for (new i = 0; i < MAX_PLAYERS; i++))
  28. {
  29. if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid, 0xAA3333AA, "You need to be level 1 to use this command!");
  30. new pName[MAX_PLAYER_NAME];
  31. GetPlayerName(playerid, pName, sizeof(pName));
  32. if(!IsPlayerAdmin(playerid)) return 0;
  33. new string[128];
  34. format(string, sizeof(string), "Admin %s has Healed all players!", pName);
  35. SendClientMessageToAll(0xFFFF00AA, string);
  36. SetPlayerArmour(i, 100.0)
  37. return 1;
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement