COMMAND:setskin(playerid, params[]) { new skin,string[60]; if(sscanf(params,"i", skin)) return SendClientMessage(playerid, -1,"[ADMIN] /setskin [SkinModel]"); if(invalidskin(skin,0,-0,-1,,-,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,99,92,74,-23,-24,-25,-26,-27,-28,)) return SendClientMessage(playerid,-1,"You can't use that skin, choose another."); if(0 > skin > 299) return SendClientMessage(playerid, -1, "You've inserted a wrong skin ID. Choose from 0-299"); format(string, sizeof(string),"%s your Skin ID now is %d.", getname(playerid), skin); SendClientMessage(playerid, 0x47568497, string); SetPlayerSkin(playerid, skin); return true; } invalidskin(skin,...) { static i,u; u = numargs(); i = 0; for(; i < u; ++i) if(skin == getarg(i)) return true; return false; } getname(playerid) { static name[24]; GetPlayerName(playerid,name,sizeof name); return name; } |
if(gTeam[playerid] != TEAM_HUMAN) //You need to edit it according to your team variable!
{
SendClientMessage(playerid, 0xFF0000FF,"You cannot use this command");
}
if(skin < 1||skin > 299) return(~~~)//try this