trying to upgrade the armor command buit it doesnt work
#1

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


PHP код:
#include <a_samp>
#define COLOR_RED 0xFF0000FF
#define COLOR_GREEN 0x00FF00FF
new Float:armour;
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/armour"cmdtexttrue10) == 0)
    {
        
#if(playerid,armour, 100);
        
GetPlayerArmour(playeridarmour);
        
SendClientMessage(playerid,COLOR_RED,"you already have an armour");
        
#else
        
SetPlayerArmour(playerid100);
        
SendClientMessage(playerid,COLOR_RED"you have buyed bulletproof vest");
        
GivePlayerMoney(playerid, -200);
        
#endif
        
return 1;
        }
    return 
0;

Reply


Messages In This Thread
trying to upgrade the armor command buit it doesnt work - by stefke150 - 02.04.2012, 13:20
Re: trying to upgrade the armor command buit it doesnt work - by Catalyst- - 02.04.2012, 13:31
Re: trying to upgrade the armor command buit it doesnt work - by stefke150 - 02.04.2012, 13:36
Re: trying to upgrade the armor command buit it doesnt work - by Shouty - 25.06.2012, 20:05

Forum Jump:


Users browsing this thread: 1 Guest(s)