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


Messages In This Thread
Class Selecting Problem - by ata001 - 09.11.2018, 09:48
Re: Class Selecting Problem - by ata001 - 09.11.2018, 16:00
Re: Class Selecting Problem - by Mrkhattak - 09.11.2018, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)