ZCMD help needed
#1

pawn Код:
CMD:setskin(playerid, params[])
{
new skinid;
if(!sscanf(params, "ud", skinid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setskin [skinid]");
if(GetPlayerSkin(playerid) == skinid)
{
    SendClientMessage( playerid, COLOR_WHITE, "* You are already using this skin-id." );
}
else
{
    SetPlayerSkin(playerid, skinid);
}
return 1;
}
Can someone help me complete this command, doesn't work. For a free-roam server.
Reply
#2

PHP код:
CMD:setskin(playeridparams[])
{
    new 
skinid;
    if(
sscanf(params"i"skinid)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /setskin [skinid]");
    if(
skinid || skinid 299) return SendClientMessage(playeridCOLOR_WHITE"Invalid Skin ID");
    if(
skinid == GetPlayerSkin(playerid)) return SendClientMessage(playeridCOLOR_WHITE"Already using that skin!");
    
//If that doesn't work try if(GetPlayerSkin(playerid) == skinid) return SendClientMessage(playerid, COLOR_WHITE, "Already using that skin!");
    
SetPlayerSkin(playeridskinid);
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)