SA-MP Forums Archive
Get same skin when spawn. - 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: Get same skin when spawn. (/showthread.php?tid=451384)



Get same skin when spawn. - Configuration - 16.07.2013

Hello evryone when player enter in game and register and quit game and join again spawn him and get old skin


Re: Get same skin when spawn. - Nines - 16.07.2013

do you have a skin selection?


Re: Get same skin when spawn. - ThePhenix - 16.07.2013

PHP код:
new Skin;
public 
OnPlayerDisconnect(playeridreason)
{
    
Skin GetPlayerSkin(playerid);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SetPlayerSkin(playeridSkin);
    return 
1;




Re: Get same skin when spawn. - RajatPawar - 17.07.2013

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
PHP код:
new Skin;
public 
OnPlayerDisconnect(playeridreason)
{
    
Skin GetPlayerSkin(playerid);
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
    
SetPlayerSkin(playeridSkin);
    return 
1;

Are you aware of what you just posted there? Have you like, switched off your brain..? Sorry for the rudeness!
You made a global variable 'Skin', saved the last disconnected player's skin into it, and then made the newest connected player's skin to that!

OT: What you must do is you should have a MySQL/INI saving system, you must include a 'skin' variable in the ENUMERATOR you use for the player's saving (PlayerInfo[playerid][pSkin]) and then save it into his ENUM and his FILE on disconnect, and on loading load it from his FILE. I hope you get what I mean.