Random player skins
#9

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(setskin,7,cmdtext);
return 0;
}
pawn Код:
dcmd_setskin(playerid, params[])
{
    if(!CmdLevelCheck(playerid,"setskin")) return CmdLevelError(playerid,"setskin");
    new id,skinid,string[128];
    if(sscanf(params, "ud", id, skinid)) return SendClientMessage(playerid, RED, "USAGE: /SETSKIN [ID / NICK] [SKINID]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, RED, "This player is offline");
    if(IsSkinWrong(skinid)) return SendClientMessage(playerid,RED,"Error: enter a valid skin-ID");
    SendCommandMsg(playerid,"setskin");
    if(playerid != id) format(string,sizeof(string),"Administrator: %s have set your skin to %d",AdminName(playerid),skinid);
    else format(string,sizeof(string),"You have set your own skin to %d",skinid);
    SendClientMessage(id,YELLOW,string);
    format(string,sizeof(string),"You have set %s his skin to %d",Name(id),skinid);
    SendClientMessage(playerid,YELLOW,string);
    return SetPlayerSkin(id,skinid);
}
Try this.
Reply


Messages In This Thread
Random player skins - by martin149 - 03.01.2013, 15:24
Re : Random player skins - by [HRD]Mar1 - 03.01.2013, 15:26
Re: Random player skins - by martin149 - 03.01.2013, 15:27
Re : Re: Random player skins - by [HRD]Mar1 - 03.01.2013, 15:28
Re: Random player skins - by aslan890 - 03.01.2013, 15:42
Re: Random player skins - by dr.lozer - 03.01.2013, 16:03
Re: Random player skins - by martin149 - 03.01.2013, 16:43
Re: Random player skins - by martin149 - 05.01.2013, 16:51
Re: Random player skins - by Affan - 05.01.2013, 17:06
Re: Random player skins - by martin149 - 05.01.2013, 17:14

Forum Jump:


Users browsing this thread: 1 Guest(s)