07.08.2010, 18:39
I got an code from ladmin4v2. I edited it, and put on my other FS :
It works normally, but when I die, the skin resets for the one which I chose on OnPlayerRequestClass.Does someone know how to avoid it?
Код:
stock IsValidSkin(SkinID) { 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)) return true; else return false; } dcmd_skin(playerid,params[]) { new tmp2[256], Index; tmp2 = strtok(params,Index); new skin = strval(tmp2); if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USO: /skin [skin id]"); if(!IsValidSkin(skin)) return SendClientMessage(playerid, COLOR_WHITE, "Skin Invalido"); return SetPlayerSkin(playerid, skin); }