04.09.2015, 11:40
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
I added
Due to this? I set my admin to 6 in userfiles
How do I make it for admin 1+? And working
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; }
Код:
if (PlayerInfo[playerid][pAdmin] < 1)
How do I make it for admin 1+? And working