SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 09/11/2018, 10:48 AM   #1
ata001
Little Clucker
 
Join Date: Sep 2018
Posts: 3
Reputation: 0
Angry Class Selecting Problem

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)

Last edited by ata001; 09/11/2018 at 11:03 AM. Reason: adding something
ata001 is offline   Reply With Quote
Old 09/11/2018, 05:00 PM   #2
ata001
Little Clucker
 
Join Date: Sep 2018
Posts: 3
Reputation: 0
Question Re: Class Selecting Problem

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.
ata001 is offline   Reply With Quote
Old 09/11/2018, 06:18 PM   #3
Mrkhattak
Little Clucker
 
Join Date: Oct 2018
Posts: 17
Reputation: 0
Default Re: Class Selecting Problem

i still use the grandlarc cuz im new to pawno
Mrkhattak is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting a class, help please. JonesyFoCoTDM Scripting Help 5 04/02/2013 09:28 PM
Print text after selecting class Pawnstar Scripting Help 6 13/11/2012 08:57 PM
When selecting class Rubennnnn Help Archive 2 06/02/2010 12:34 PM
music at selecting class jamesbond007 Help Archive 2 02/12/2009 12:30 PM
When I'm selecting a class.. Mayo Help Archive 5 14/04/2009 07:58 PM


All times are GMT. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.