Armour not working.
#6

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
PHP код:
CMD:setarmor(playeridparams[])
{
    new 
playaFloat:armor;
    if(
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pEventModd] > 0)
    {
        if(!
sscanf(params"uf"playaarmor))
        {
            if(
IsPlayerConnected(playa))
            {
                if(
playa != INVALID_PLAYER_ID)
                {
                    
strmid(giveplayerPlayerICName(playa), 0MAX_PLAYER_NAME);
                    
SetPlayerArmour(playaarmour);
                    
format(strsizeof(str), "You have set %s's armor to %.1f."giveplayerarmor);
                    
SendClientMessage(playeridCOLOR_GREYstr);
                }
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"{00BFFF}Usage:{FFFFFF} /setarmor [playerid/PartOfName] [armor]");
        }
    }
    else
    {
        
AdmErrorMsg;
    }
    return 
1;

The problem was very simple, Because armor is not just a random number, It's a float, same as health.
Not working mate. Any help would be appreciated.
Reply


Messages In This Thread
Armour not working. - by Clergy - 01.10.2017, 14:07
Re: Armour not working. - by BreakStore - 01.10.2017, 14:13
Re: Armour not working. - by Clergy - 01.10.2017, 14:25
Re: Armour not working. - by BreakStore - 01.10.2017, 14:26
Re: Armour not working. - by FuNkYTheGreat - 01.10.2017, 14:44
Re: Armour not working. - by Clergy - 01.10.2017, 15:49
Re: Armour not working. - by Sew_Sumi - 01.10.2017, 16:07
Re: Armour not working. - by Clergy - 01.10.2017, 16:59
Re: Armour not working. - by RxErT - 01.10.2017, 17:02
Re: Armour not working. - by Clergy - 01.10.2017, 17:28

Forum Jump:


Users browsing this thread: 4 Guest(s)