Quote:
Originally Posted by Sh4d0w2
For this,you need to make the choosen skin saved.
Add this /saveskin command and it should work :
PHP код:
COMMAND:saveskin(playerid, params[])
{
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;
}
Remember to add
PHP код:
#include <YSI\y_ini
on top
|
Thankyou. But, where to put that code? under OnPlayerCommandText?