Roleplay register system? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Roleplay register system? (
/showthread.php?tid=247546)
Roleplay register system? -
justsomeguy - 09.04.2011
Hello i have seen on like every server an system that asks things like:
What is your birthday.
Are you a male or a female.
From what country are you from?
How do i make something like this?
Re: Roleplay register system? -
Mean - 09.04.2011
For gender:
Anywhere, like in a command or something
pawn Код:
ShowPlayerDialog( playerid, 0, DIALOG_STYLE_LIST, "Are you a male or female?", "Male\nFemale, "Choose", "" )
Later...
pawn Код:
new gender[ MAX_PLAYERS ];
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
{
if( dialogid == 0 )
{
if( response )
{
switch( listitem )
{
case 0: gender[ playerid ] = 1; // 1 is male, 2 is female
case 1: gender[ playerid ] = 2;
}
}
}
return false;
}
pawn Код:
public OnPlayerConnect( playerid )
{
gender[ playerid ] = 0;
return 1;
}
pawn Код:
public OnPlayerDisconnect( playerid, reason )
{
gender[ playerid ] = 0;
return 1;
}
I am actually suprised you don't know that.
And a command to see your gender
pawn Код:
CMD:mygender( playerid, params[ ] )
{
if( gender[ playerid ] == 1 )
SendClientMessage( playerid, 0xAAAAAA, "Your gender is male" );
else if( gender[ playerid ] == 2 )
SendClientMessage( playerid, 0xAAAAAA, "Your gender is female" );
return 1;
}
Re: Roleplay register system? -
justsomeguy - 09.04.2011
i am new with rp scripting.
Re: Roleplay register system? -
Mean - 09.04.2011
Check my first post, I edited it, I wrote a /mygender cmd.