Gender dialog - 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: Gender dialog (
/showthread.php?tid=324297)
Gender dialog -
vernz - 09.03.2012
pawn Код:
case DIALOG_AGE:
{
if(response)
{
PlayerInfo[playerid][pAge] = strval(inputtext);
new string[64];
format(string, sizeof(string),"[Server]: So you are %s years old.", inputtext);
SendClientMessage(playerid, COLOR_ORANGE, string);
ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_INPUT,"Gender Selection","You are a male or a female?","Done","Leave");
}
}
Hi, I'd like to do the same thing with gender using DIALOG_STYLE_MSGBOX, how am i suposed to write in the .ini file by example male if they choose male or female if they choose female ?
Re: Gender dialog -
eesh - 09.03.2012
ShowPlayerDialog(playerid,DIALOG_SEX,DIALOG_STYLE_ MSGBOX,"Gender Selection","You are a male or a female?","Male","Female");
if(response) male
else female
Re: Gender dialog -
Ballu Miaa - 09.03.2012
First of all you will need be a create a variable in the Player Enumeration so that you can store 1 or 0 there as Female and Male!
I can do it completely for you on teamviewer if you want. Let me know!
Re : Gender dialog -
vernz - 09.03.2012
I already know it it works for int like money etc if itll store 0 or 1 when a player will/stats itll show 1 or 0 and not male or female
Re: Gender dialog -
Ballu Miaa - 09.03.2012
ShowPlayerDialog List one to the player. First option should be male and second should be female. When they select male. Under OnDialogResponse increment the PlayerInfo[playerid][pGender] = 0; and PlayerInfo[playerid][pGender] = 1; when they select a female. Under OnPlayerDisconnect you might be saving stats of the player. There add this new Pvar and its current value.
On Stats
You will need to create an array which will change string when its 0 or 1 and use it show player gender under ShowStats!
Re : Gender dialog -
vernz - 09.03.2012
Could you please do it here for me im not sure to understand and i cant teamviewer im not at home presently
Re: Re : Gender dialog -
Ballu Miaa - 09.03.2012
Quote:
Originally Posted by vernz
Could you please do it here for me im not sure to understand and i cant teamviewer im not at home presently
|
Paste your game mode at
www.pastebin.com and send me the link via Private Messages! Ill add this feature into it for you for free
!
Have fun.
Re : Gender dialog -
vernz - 09.03.2012
Fine later on when ill be at home
like tomorow
thanks
Re: Re : Gender dialog -
Ballu Miaa - 09.03.2012
Quote:
Originally Posted by vernz
Fine later on when ill be at home like tomorow thanks
|
Allright anytime mate. Just PM me the game mode and ill fix or add what you want. Peace!
Re: Gender dialog -
new121 - 09.03.2012
I suggest starting off with this
https://sampforum.blast.hk/showthread.php?tid=309653