Roleplay register system?
#1

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

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;
}
Reply
#3

i am new with rp scripting.
Reply
#4

Check my first post, I edited it, I wrote a /mygender cmd.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)