ID bug
#2

PHP код:
CMD:setskin(playeridparams[])
{
    if (
PlayerInfo[playerid][pAdmin] >= 3)
    {
        new 
string[128], giveplayeridskinid;
        if(
sscanf(params"ud"giveplayeridskinid)) return SendClientMessageEx(playeridCOLOR_GREY"USAGE: /setskin [player] [skinid]");

        if(
IsPlayerConnected(giveplayerid))
        {
            if(!
IsInvalidSkin(skinid))
            {
                if(
GetPlayerSkin(giveplayerid) == skinid)
                {
                    
SendClientMessageExplayeridCOLOR_WHITE"The player you're trying to change skins of already is using the skin you're trying to set." );
                }
                else
                {
                    
PlayerInfo[giveplayerid][pModel] = skinid;
                    
format(stringsizeof(string), "Your skin has been changed to ID %d by Administrator %s."skinidGetPlayerNameEx(playerid));
                    
SendClientMessageEx(giveplayeridCOLOR_WHITEstring);
                    
format(stringsizeof(string), "You have given %s skin ID %d."GetPlayerNameEx(giveplayerid), skinid);
                    
SendClientMessageEx(playeridCOLOR_WHITEstring);
                    
SetPlayerSkin(giveplayeridPlayerInfo[giveplayerid][pModel]);
                }
            }
            else
            {
                
SendClientMessageEx(playeridCOLOR_GREY"Invalid skin ID!");
            }
        }
    }
    else
    {
        
SendClientMessageEx(playeridCOLOR_GRAD1"You are not authorized to use that command.");
    }
    return 
1;

Should Work.
Reply


Messages In This Thread
ID bug - by xMCx - 15.09.2012, 16:55
Re: ID bug - by Sig Hansen - 15.09.2012, 17:02
Re: ID bug - by xMCx - 15.09.2012, 17:31
Re: ID bug - by Sig Hansen - 15.09.2012, 17:33
Re: ID bug - by xMCx - 15.09.2012, 17:42
Re: ID bug - by Ronaldo_raul™ - 15.09.2012, 17:50
Re: ID bug - by xMCx - 15.09.2012, 18:05
Re: ID bug - by Ronaldo_raul™ - 15.09.2012, 18:30
Re: ID bug - by xMCx - 15.09.2012, 18:38
Re: ID bug - by TheBlackKnight - 15.09.2012, 18:41

Forum Jump:


Users browsing this thread: 2 Guest(s)