SA-MP Forums Archive
Class Selection not working via dialog help please? - 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: Class Selection not working via dialog help please? (/showthread.php?tid=457351)



Class Selection not working via dialog help please? - NinjahZ - 11.08.2013

I have setup 2 classes for my TDM script,I get no errors in compiling but when I start the server up and join the server
I get to the login system,that works fine,then shows the team selection dialog,but after selecting my class it does nothing,neither does the spawn button


Re: Class Selection not working via dialog help please? - xganyx - 11.08.2013

Can you share us your code?


Re: Class Selection not working via dialog help please? - NinjahZ - 11.08.2013

Yes,can I pm you a link to my Github full code?


AW: Class Selection not working via dialog help please? - Nero_3D - 11.08.2013

You need to return 1 at OnPlayerRequestClass and OnPlayerRequestSpawn to let the Spawn button work


Re: Class Selection not working via dialog help please? - Jarnu - 11.08.2013

Nero_3D you didn't got him properly.

He says .. When he click one team. (You can say select one team). He should get the other dialog i.e. class dialog which he is not getting.

and to get it, make it like

pawn Код:
//For team dialog
if(!response) { /*show back the team dialog*/ }
switch(listitem) {
   case 0: //Show class dialog
   case 1: //Show class dialog.
}

//WARNING: It is just an example of doing it not exact one. It is up to you how you want it



Re: Class Selection not working via dialog help please? - NinjahZ - 11.08.2013

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
Nero_3D you didn't got him properly.

He says .. When he click one team. (You can say select one team). He should get the other dialog i.e. class dialog which he is not getting.

and to get it, make it like

pawn Код:
//For team dialog
if(!response) { /*show back the team dialog*/ }
switch(listitem) {
   case 0: //Show class dialog
   case 1: //Show class dialog.
}

//WARNING: It is just an example of doing it not exact one. It is up to you how you want it
No,Nero is right,when my Dialog for class/teams come up,I click it,but nothing happens,which will be because
return 1; was not there