02.04.2012, 13:20
i'm a noobie in scripting so
if the player is using the command /armour then her get 100 armor
but if the player already have 100 armor he can't use that command
i got something like this
if the player is using the command /armour then her get 100 armor
but if the player already have 100 armor he can't use that command
i got something like this
PHP код:
#include <a_samp>
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
new Float:armour;
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/armour", cmdtext, true, 10) == 0)
{
#if(playerid,armour, 100);
GetPlayerArmour(playerid, armour);
SendClientMessage(playerid,COLOR_RED,"you already have an armour");
#else
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_RED, "you have buyed bulletproof vest");
GivePlayerMoney(playerid, -200);
#endif
return 1;
}
return 0;
}