SA-MP Forums Archive
Class Selecting Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Class Selecting Problem (/showthread.php?tid=660647)



Class Selecting Problem - ata001 - 09.11.2018

Hello
I'd made some classes (not teams) like soldier,... that has a dialog:
Code:
ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
that I've done like this:
Code:
public OnPlayerSpawn(playerid)
{
    ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
	return 1;
}
And I'd made a command for switching between class while playing (not onplayerspawn):
Code:
CMD:sc(playerid,params[])
{
    ShowPlayerDialog(playerid, DIALOG_CLASS2, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
    return 1;
}
I don't have any problem with dialogs and their action.
BUT

When i use /sc command and switch my class, it spawns me.
SO

The OnPlayerSpawn function comes up:
Code:
public OnPlayerSpawn(playerid)
{
    ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
	return 1;
}
And request me to choose my class again.


I just know that I have to change the place of:
Code:
howPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
To not To Be In OnPlayerSpawn function.


Can You Help Me With My Problem?
What Can I Do For This (To Not To Show The Dialog 2 Times When I Use /Sc Command And Respawns Me)


Re: Class Selecting Problem - ata001 - 09.11.2018

Quote:
Originally Posted by ata001
View Post
Hello
I'd made some classes (not teams) like soldier,... that has a dialog:
Code:
ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Entekhabe Class", "Sarbaz\nSniper\nMohandes\nHealer\nJasoos\nSartip\nKhalaban\nJangavar\nVIP+Admin", "Entekhab", "");
If possible:
I want a dialog for selecting teams which contains the number of players in each team.


Re: Class Selecting Problem - Mrkhattak - 09.11.2018

i still use the grandlarc cuz im new to pawno