SA-MP Forums Archive
OnPlayerRequestClass help please! [REP+] - 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: OnPlayerRequestClass help please! [REP+] (/showthread.php?tid=336049)



OnPlayerRequestClass help please! [REP+] - WarriorEd22 - 20.04.2012

closed.


Re: OnPlayerRequestClass help please! [REP+] - Ainseri - 20.04.2012

You can't really. AddPlayerClass is run on OnGameModeInit(). You could try using SetPlayerSkin under OnPlayerRequestClass (with a boolean, so it only happens once) and then again under OnPlayerSpawn (toggling the boolean from the previous callback).


Re: OnPlayerRequestClass help please! [REP+] - Face9000 - 21.04.2012

Quote:
Originally Posted by WarriorEd22
Посмотреть сообщение
So every time I press F4 and commit suicide, it will take me to the class/skin selection screen; it will load up the last skin I had.

I already have a skin saving system. It currently works but I just need it so when someone has a skin and they decide to re-login or commit suicide to go into the class/skin selection screen, their last skin will show up first. How do I do that? Thanks,
Store the skin used in the player account,call it when a player login and use SetPlayerSkin connected to the skin id stored before.It should work.


Re: OnPlayerRequestClass help please! [REP+] - WarriorEd22 - 21.04.2012

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Store the skin used in the player account,call it when a player login and use SetPlayerSkin connected to the skin id stored before.It should work.
I've been trying nearly for a week now and I'm about to give up. Do you think you can help me on this one bit of coding? Thanks,


Re: OnPlayerRequestClass help please! [REP+] - Face9000 - 21.04.2012

Quote:
Originally Posted by WarriorEd22
Посмотреть сообщение
I've been trying nearly for a week now and I'm about to give up. Do you think you can help me on this one bit of coding? Thanks,
Sure.Just tell me how the skin save/load system works.