How do i make class system like this? - 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: How do i make class system like this? (
/showthread.php?tid=565661)
How do i make class system like this? -
KomplettMaster - 28.02.2015
How do i make the class selection like this? I am not getting it to work with the login :/ And im not so dumb that i dont know i have to use dialogs
The login system:
http://pastebin.com/aJ1TgnEg
Re: How do i make class system like this? -
CalvinC - 28.02.2015
Start off by using
ShowPlayerDialog to show a dialog to a player, show a "DIALOG_STYLE_LIST".
Then use the
OnDialogResponse callback to detect which buttons he presses. (use listitem and such functions to check buttons, explained in the wiki)
Then according after which button he presses, use
SetSpawnInfo to set the player's info when spawning (including team, skin, spawn coordinates and weapons.
Then in the same place you use that, use
SpawnPlayer right after it to spawn the player with that team, skin, weapons and at those coordinates.
Re: How do i make class system like this? -
KomplettMaster - 28.02.2015
Quote:
Originally Posted by CalvinC
Start off by using ShowPlayerDialog to show a dialog to a player, show a "DIALOG_STYLE_LIST".
Then use the OnDialogResponse callback to detect which buttons he presses. (use listitem and such functions to check buttons, explained in the wiki)
Then according after which button he presses, use SetSpawnInfo to set the player's info when spawning (including team, skin, spawn coordinates and weapons.
Then in the same place you use that, use SpawnPlayer right after it to spawn the player with that team, skin, weapons and at those coordinates.
|
http://pastebin.com/22nrhs0H Now i have done that, but when im typing wrong password, the login dialog is being redirected to class selection, is it any ways to stop that? Thats irritable because then its changing position