SA-MP Forums Archive
Auto save skin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto save skin (/showthread.php?tid=354333)



Auto save skin - kbalor - 26.06.2012

PHP код:
CMD:skin(playeridparams[])
{
    new 
skin;
    if(
sscanf(params"i"skin)) return SendClientMessage(playerid, -1"{FFFF00}Usage: /skin <ID> 0-299");
    if(
skin 299 || skin 0) return SendClientMessage(playerid, -1"{FF0000}Invalid {FF0000}ID. {FFFF00}Available Skin IDs are 1 to 299");
    
GameTextForPlayer(playerid,"~g~Skin ~g~Changed",2000,3);
    
SetPlayerSkin(playeridskin);
    return 
1;

How to make every time player use /skin command. it automatically save/load after player leave and join the server.