13.10.2013, 08:45
i want to save the player skin
how can i ?
just give me examples
how can i ?
just give me examples
pawn Код:
CMD:skin(playerid,params[])
{
new skinid,string[128],file[64];
if(sscanf(params, "i",skinid)) return SendClientMessage(playerid,0xFFDD00AA, "** Usage: /skin [skinid].");
if(skinid > 299 || skinid < 0) return SendClientMessage(playerid,0xFFDD00AA, "* Invalid Skin ID.");
format(file,sizeof file,"Admin/%s.ini",GetName(playerid));
INI_Open(file);//Opening the file with SII include
INI_SetString("Skin",skin);
INI_WriteInt("Skin",skinid);//Writing the line "Level" the selected admin level.
INI_Save();//Saving the file
INI_Close();//Closing the file
SetPlayerSkin(playerid,skinid);
format(string,sizeof(string), "** You changed your skin to %d",skinid);
SendClientMessage(playerid,0xFFDD00AA,string);
return 1;
}