20.11.2017, 17:40
Код:
CMD:saveskin(playerid, params[], help) { new skinid, string[256]; if(skinid > 299) return SendClientMessage(playerid,COLOR_RED,"ERROR: Available Skin: 0 - 299 !"); format(string, sizeof(string), "You have saved your correct skin!"COL_YELLOW" use /deleteskin to unsave it."); SendClientMessage(playerid, COLOR_GREY, string); skinid = GetPlayerSkin(playerid); new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"SavedSkin",skinid); INI_Close(File); return 1; }
Код:
INI_WriteInt(File,"SavedSkin",-1);
Код:
if(PlayerInfo[playerid][pSavedSkin] >=0 ) return SetPlayerSkin(playerid,PlayerInfo[playerid][pSavedSkin]);
And when I'm trying to make it OnPlayerSpawn, it makes the skinid to '0' and changes the virtual world or interior idk.
If someone knows how to fix that problem I will be thankful!