Class Selecting Problem
#1

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)
Reply
#2

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.
Reply
#3

i still use the grandlarc cuz im new to pawno
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)