Preselect the player class? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Preselect the player class? (
/showthread.php?tid=92212)
Preselect the player class? -
Programie - 18.08.2009
Hi,
I save the selected player class in a MySQL table on my server. But how can I restore the selected class.
I mean if I select class 15 and spawn and then leave the server and come back again, class 15 should be selected on the Class Selection screen. So I don't have to scroll to class 15.
How can I make it work?
Re: Preselect the player class? -
Programie - 26.08.2009
Does no one have an idea?
Re: Preselect the player class? -
Dabombber - 26.08.2009
Look at how YSI does it, create 3 dummy classes and use a change to tell which direction the player changed to. If you do it this way, you can make the initial class anywhere in your list.
Re: Preselect the player class? -
Programie - 26.08.2009
Ok, I'll try it.
//EDIT: Ok it works.

But now the next problem: There are just 3 classes. Is it possible to remove the text "Class x weapons" from the class selection or replace it with a custom text (e.g. "Skin x")?