31.03.2014, 06:38
Hi i want that when a player spawn if his skin is saved , to set the playerid the skin
iv this cmd
INI_WriteInt(ACCOUNT, "Skin", skinid); == Saved ID I want to load this under onplayerspawn
iv this cmd
INI_WriteInt(ACCOUNT, "Skin", skinid); == Saved ID I want to load this under onplayerspawn
Код:
CMD:myskin(playerid,params[]) { if(pInfo[playerid][pLevel] >= 0) { new skinid,Jfile[100]; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, yellow, "Usage: /Myskin <skin ID>") ; if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, red, "Invaild Skin ID!"); format(Jstring,sizeof(Jstring),"You have set skin '%d' as your favorite skin!", skinid); SendClientMessage(playerid,yellow,Jstring); format(Jfile, 100, ACCOUNTS_PATH, GetName(playerid)); new INI:ACCOUNT = INI_Open(Jfile); INI_WriteInt(ACCOUNT, "Skin", skinid); INI_Close(ACCOUNT); pInfo[playerid][Skin] = skinid; SetPVarInt(playerid,"Useskin",1); CommandToAdmins(playerid,"myskin"); return SetPlayerSkin(playerid, skinid); } else return ShowMessage(playerid, red, 1); }