11.08.2011, 11:19
I want to make this /saveskin cmd to normal players.This cmd i taken from ladmin
I tryed to make it for normal playersand it didnt showed any errors or warnings.But when i use that command and relog, the skin isnt saved.But if a admin use that cmd then it will save.
I want to make it for normal players, please anyone help me .
pawn Код:
CMD:saveskin(playerid,params[]) {
if(PlayerInfo[playerid][Level] >= 1 && PlayerInfo[playerid][LoggedIn] == 1) {
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /saveskin [skinid]");
new string[128], SkinID = strval(params);
if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299))
{
dUserSetINT(PlayerName2(playerid)).("FavSkin",SkinID);
format(string, sizeof(string), "You have successfully saved this skin (ID %d)",SkinID);
SendClientMessage(playerid,yellow,string);
SendClientMessage(playerid,yellow,"Type: /useskin to use this skin when you spawn or /dontuseskin to stop using skin");
dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
return CMDMessageToAdmins(playerid,"SAVESKIN");
} else return SendClientMessage(playerid, green, "ERROR: Invalid Skin ID");
} else return SendClientMessage(playerid,red,"ERROR: You must be an administrator to use this command");
}
I want to make it for normal players, please anyone help me .