29.08.2012, 00:24
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/helphelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_RED,"If you want to heal yourself use /healme, wich will cost 500 and for armour /armour wich will be 1000.");
return 1;
}
if (strcmp("/healme", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid,100);
GivePlayerMoney(playerid,-500);
SendClientMessage(playerid,COLOR_GREEN,"You have reafilled your health.");
SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
return 1;
}
if (strcmp("/armourme", cmdtext, true, 10) == 0)
{
SetPlayerArmour(playerid,100);
SendClientMessage(playerid,COLOR_RED,"You have refilled your armour.");
SendClientMessage(playerid,COLOR_BLUE,"Make sure to /healhelp for more information!");
return 1;
}
return 1;
}
Second Edit:
pawn Код:
SetPlayerArmor(playerid,100);
pawn Код:
SetPlayerArmour(playerid,100);