Armour not working.
#10

Quote:
Originally Posted by RxErT
Посмотреть сообщение
Try this one which im using it in my script:

PHP код:
CMD:setarmour(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 2)
    {
        new 
ID; new amount;
        if(
sscanf(params,"ui",ID,amount)) return SendClientMessage(playerid,0xf8f8f8fff,"Syntax: {F00f00}/setarmour [ID] [amount]");
        if(!
IsPlayerConnected(ID)) return SendClientMessage(playerid0xf8f8f8fff,"ERROR: {FFFFFF}Player isn't connected!");
        if(
amount || amount 100) return SendClientMessage(playerid0xf8f8f8fff"ERROR: {FFFFFF}Invalid amount (0 -> 100).");
        if(
PlayerInfo[ID][pAdmin] >= PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid0xf8f8f8fff,"ERROR: {FFFFFF}You can't set armour to this admin!");
        new 
string[128]; new pname[MAX_PLAYER_NAME];
        
GetPlayerName(playeridpnamesizeof(pname));
        
format(stringsizeof(string), "{f00f00}Administrator {f00f00}%s {ffa700}has set your armour amount to {f00f00}%d!",pname,amount);
        
SendClientMessage(ID,0xf8f8f8fff,string);
        
SetPlayerArmour(ID,amount);
        
SendClientMessage(playerid0xf8f8f8fff,"[ADMIN] {FFFFFF}Player armour amount has been changed!");
    }
    else
    {
    
SendClientMessage(playerid,0xf8f8f8fff,"ERROR: {FFFFFF}You aren't authorized to use this command!");
    }
    return 
1;

it should work, but if it doesn't you should kill yourself
It's not working!, I don't think its from the command. Its from the 'SetPlayerArmour' itself.
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: 1 Guest(s)