Thread: setarmour issue
View Single Post
Old 19/06/2013, 07:00 AM   #1
itsCody
Gangsta
 
Join Date: Nov 2012
Location: Canada
Posts: 519
Reputation: 45
Default setarmour issue

When you set somebody's armour it calls back as "Blah has set blah's armour to 12435046"
And I can't quite find the issue.

pawn Code:
dcmd_setarmour(playerid, params[])
{
    new id;
    new amount;
    new string[70];
    if(sscanf(params,"uf",id,amount)) return SendClientMessage(playerid,COLOR_ERROR, "Usage: /setarmour [ID] [AMOUNT]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_ERROR,"This player is not connected.");
    else
    {
    SetPlayerArmour(id,amount);
    format(string,sizeof(string),"{FF0000}[ADMIN] {FFFFFF}%s[%d] has set %s[%d]'s armour to %d.",PlayerName(playerid),playerid,PlayerName(id),id,amount);
    SendClientMessageToAll(COLOR_WHITE,string);
    return 1;
    }
}
itsCody is offline   Reply With Quote