10.11.2014, 12:20
Hi Guys I have Problйm in Save Player Skin
Help
Help
enum pData pSkin,
#define SKIN_ID 150
YCMD:myskin(playerid, params[], help) { new skinid, string[256]; if(sscanf(params, "i", skinid)) SendClientMessage(playerid, 0xFFFFFFAA,"usage: /saveskin[skinid]"); if(skinid > 299) return SendClientMessage(playerid,0xFF0000AA,"error: Available Skin: 0 - 299 !"); SetPlayerSkin(playerid,skinid); format(string, sizeof(string), "You changed your Skin-ID succesful!"); SendClientMessage(playerid, 0xFF0000AA, string); // Now we will save the Skin. new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"SkinID",skinid); INI_Close(File); return 1; }
SetPlayerSkin(playerid,P_Data[playerid][pSkin]);
YCMD:myskin(playerid, params[], help) { new skinid, string[256]; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, 0xFFFFFFAA,"usage: /saveskin[skinid]"); if(0 < skinid > 299) return SendClientMessage(playerid,0xFF0000AA,"error: Available Skin: 0 - 299 !"); SetPlayerSkin(playerid,skinid); format(string, sizeof(string), "You changed your Skin-ID succesful!"); SendClientMessage(playerid, 0xFF0000AA, string); // Now we will save the Skin. new INI:File = INI_Open(UserPath(playerid)); INI_SetTag(File,"data"); INI_WriteInt(File,"SkinID",skinid); INI_Close(File); return 1; }
YCMD:myskin(playerid, params[], help)
{
new skinid, string[256];
if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, 0xFFFFFFAA,"usage: /saveskin[skinid]");
//>>>> if(0 < skinid > 299) return SendClientMessage(playerid,0xFF0000AA,"error: Available Skin: 0 - 299 !");
SetPlayerSkin(playerid,skinid);
format(string, sizeof(string), "You changed your Skin-ID succesful!");
SendClientMessage(playerid, 0xFF0000AA, string);
// Now we will save the Skin.
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"SkinID",skinid); //<<<< Or This
INI_Close(File);
return 1;
}
forward Load_myini(playerid, tag[], name[], value[]);
public Load_myini(playerid, tag[], name[], value[])
{
}
YCMD:myskin(playerid, params[], help)
{
new skinid, string[256];
if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, 0xFFFFFFAA,"usage: /saveskin[skinid]");
if(0 < skinid > 299) return SendClientMessage(playerid,0xFF0000AA,"error: Available Skin: 0 - 299 !");
format(string, sizeof(string), "You changed your Skin-ID succesful!");
SendClientMessage(playerid, 0xFF0000AA, string);
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"SkinID",skinid);
INI_Close(File);
P_Data[playerid][pSkin] = skinid;
SetPlayerSkin(playerid,P_Data[playerid][pSkin]);
return 1;
}
INI_WriteInt(File,"SkinID",P_Data[playerid][pSkin]);