Save Skin
#1

Hi Guys I have Problйm in Save Player Skin
Help
Reply
#2

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)
Reply
#3

Код:
enum pData
    pSkin,
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]); 
Reply
#4

Код:
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;
}
Reply
#5

Don't Work
Reply
#6

Remove the SKINID define. It's useless. I don't know what you are trying to do.
Reply
#7

What You Mean ??
i will Remove What??
PHP код:
YCMD:myskin(playeridparams[], help)
{
    new 
skinidstring[256];
    if(
sscanf(params"i"skinid)) return SendClientMessage(playerid0xFFFFFFAA,"usage: /saveskin[skinid]");
  
//>>>>  if(0 < skinid > 299) return SendClientMessage(playerid,0xFF0000AA,"error: Available Skin: 0 - 299 !");
    
SetPlayerSkin(playerid,skinid);
    
format(stringsizeof(string), "You changed your Skin-ID succesful!");
    
SendClientMessage(playerid0xFF0000AAstring);
   
// 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;

Reply
#8

show your loadplayer_statistics
pawn Код:
forward Load_myini(playerid, tag[], name[], value[]);
public Load_myini(playerid, tag[], name[], value[])
{
}
the one that you parse
Reply
#9

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]);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)