Setskin cmd
#4

Why is not doing anything? I type the command and I don't get the 'Usage' and if I type the id is doing nothing.
Example /setskin
nothing

Example /setskin 0 3 - NOTHING

Код:
CMD:setskin(playerid, params[])
{
   new targetplayer, skinid;
   if (PlayerInfo[playerid][pAdmin] < 1)
   //if(IsPlayerAdmin(playerid)) return 0;
   {
   if(sscanf(params, "ui", targetplayer, skinid)) return SendClientMessage(playerid, COLOR_ORANGE, "<Usage> /setskin [ID] [skinid]"); // this line is for; if you type /setskin, you will receive a message displayed with the "Usage" part.
   if(skinid < 0 || skinid > 311) return SendClientMessage(playerid, COLOR_RED, "<Error> Available skinids 0 - 311");
   if(!IsPlayerConnected(targetplayer)) return SendClientMessage(playerid, COLOR_RED, "<Error> Player is not connected!");
   //==-==
   new string[150], pName[MAX_PLAYER_NAME];
   SetPlayerSkin(targetplayer, skinid);
   format(string, sizeof string, "<ACCOUNT> Your skinid has been set by an admin to %i", skinid);
   SendClientMessage(targetplayer, COLOR_GREEN, string);
   GetPlayerName(targetplayer, pName, MAX_PLAYER_NAME);
   format(string, sizeof string, "<AdmCmd> You have set %s's skinid to %i", pName, skinid);
   SendClientMessage(playerid, COLOR_WHITE, string);
   }
   return 1;
}
I added
Код:
 if (PlayerInfo[playerid][pAdmin] < 1)
Due to this? I set my admin to 6 in userfiles

How do I make it for admin 1+? And working
Reply


Messages In This Thread
Setskin cmd - by AndreiWow - 04.09.2015, 11:16
Re: Setskin cmd - by jlalt - 04.09.2015, 11:21
Re: Setskin cmd - by AndreiWow - 04.09.2015, 11:30
Re: Setskin cmd - by AndreiWow - 04.09.2015, 11:40
Re: Setskin cmd - by jlalt - 04.09.2015, 11:41
Re: Setskin cmd - by saffierr - 04.09.2015, 13:20
Re: Setskin cmd - by saffierr - 04.09.2015, 13:38
Re: Setskin cmd - by AndreiWow - 04.09.2015, 14:01
Re: Setskin cmd - by saffierr - 04.09.2015, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)