Save Skin -
AYOUYOU - 10.11.2014
Hi Guys I have Problйm in Save Player Skin
Help
Re: Save Skin -
zT KiNgKoNg - 10.11.2014
The code that saves and loads the skin, would..
A) Help us help you
B) Let us understand how it functions to help you
C) Actually let us help you (without it why bother asking)
Re : Re: Save Skin -
AYOUYOU - 10.11.2014
PHP код:
#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;
}
and this in OnPLayerSpawn
PHP код:
SetPlayerSkin(playerid,P_Data[playerid][pSkin]);
Re: Save Skin -
Sabur - 10.11.2014
Код:
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;
}
Re : Save Skin -
AYOUYOU - 10.11.2014
Don't Work
Re: Save Skin -
Sabur - 10.11.2014
Remove the SKINID define. It's useless. I don't know what you are trying to do.
Re : Save Skin -
AYOUYOU - 10.11.2014
What You Mean ??
i will Remove What??
PHP код:
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;
}
Re: Save Skin -
Quickie - 10.11.2014
show your loadplayer_statistics
pawn Код:
forward Load_myini(playerid, tag[], name[], value[]);
public Load_myini(playerid, tag[], name[], value[])
{
}
the one that you parse
Respuesta: Save Skin -
!R1Ch@rD! - 11.11.2014
try?
pawn Код:
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;
}
searches data server where bone in this saveplayer stored pon
pawn Код:
INI_WriteInt(File,"SkinID",P_Data[playerid][pSkin]);