06.03.2010, 09:35
This is one of my cmds.
Код:
if (strcmp("/armour (playerid)", cmdtext, true, 7) == 0) // Change "/armour" to whatever you want to e.g "/a" (a for armour) { if(IsPlayerAdmin(playerid)) // This checks if the player is logged on Rcon. { SetPlayerArmour(playerid, 100); // This sets the armour of the player to 100. SendClientMessage(playerid,COLOUR_RED,"You gave armour to %s!"); // This sends the msg "You gave armour to [name of the player]" change it to what you want it to say. This will only be seen by you SendPlayerMessageToPlayer(playerid, COLOUR_YELLOW,"%s gave you armour!"); // This will send a msg to the player and inform him/her that you gave him/her armour. You can change the text. (only Him/her will see it) return 1; } }