Command problem
#8

PHP код:
CMD:setarmour(playerid,params[])
{
    if(
pInfo[playerid][pLevel] >= 2)
    {
        new 
idFloat:amount;
        if(
sscanf(params"uf",id,amount)) return SendClientMessage(playeridyellow"Usage: /Setarmour <Player ID/Part of nick> <Amount> (1-100)!");
        if(
IsPlayerConnected(id))
        {
            if(
amount <= 0.0 || amount 100.0) return SendClientMessage(playeridred"Invalid amount!");
            
format(Jstringsizeof(Jstring), "You have set %s's Armour to '%d'"GetName(id), amount);
            
SendClientMessage(playerid,yellow,Jstring);
            
format(Jstring,sizeof(Jstring),"Admin '%s' has set your Armour to '%d'"GetName(playerid), amount);
            
SendClientMessage(id,yellow,Jstring);
            
SetPlayerArmour(idamount);
            
CommandToAdmins(playerid,"setarmour");
            return 
1;
        }
        else return 
ShowMessage(playeridred2);
    }
    else return 
ShowMessage(playeridred1);

new idiot_count = 5;
Reply


Messages In This Thread
Command problem - by Mijata - 04.06.2016, 00:06
Re: Command problem - by WhiteGhost - 04.06.2016, 00:08
Re: Command problem - by Onfroi - 04.06.2016, 00:10
Re: Command problem - by CSLangdale - 04.06.2016, 00:16
Re: Command problem - by MBilal - 04.06.2016, 00:33
Re: Command problem - by Mijata - 04.06.2016, 00:51
Re: Command problem - by Dayrion - 04.06.2016, 01:14
Re: Command problem - by AbyssMorgan - 04.06.2016, 05:34
Re: Command problem - by Threshold - 04.06.2016, 06:19

Forum Jump:


Users browsing this thread: 1 Guest(s)