22.02.2009, 21:36
Quote:
Originally Posted by Norn
pawn Код:
|
pawn Код:
#define color // Your color code here
if(!strcmp("/hp", cmdtext, true, 3) // 3 is the lenght. 1 for '/', 2 for 'h' and 3 for 'p'
// but you have another command starting by /hp it won't work
{
if(cmdtext[3] == 0)
{
SendClientMessage(playerid, color, "USAGE: /hp [health]");
return 1;
}
SetPlayerHealth(playerid, cmdtext[4]);
SendClientMessage(playerid, color, "You have healed yourself to %d health", cmdtext[4])"
return 1;
}
if(!strcmp("/armor", cmdtext, true, 6)
{
if(cmdtext[6] == 0)
{
SendClientMessage(playerid, color, "USAGE: /armor [ammount]");
return 1;
}
SetPlayerArmor(playerid, cmdtext[7]);
SendClientMessage(playerid, color, "You have given yourself %d armor", cmdtext[7])"
return 1;
}