SA-MP Forums Archive
Advanced registration 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)
+--- Thread: Advanced registration system. (/showthread.php?tid=331921)



Advanced registration system. - Shetch - 06.04.2012

Hey guys!
I have a question about how to make an advanced roleplay registration system.
I have the register/login dialogs, but i wasnt to add a series of question for the registration part.
Like, "Whats the meaning or OOC and IC?", then you would answer the question using a input dialog box.
Once you're done with the question, the server would sen the application to all admins.
Admins would have to type something like '/accept Bob_Marley' to accept the application.
Then they would decide if the player is ready to play on the server, by clicking 'Accept' or 'Deny'.

My question is, how would i make the '/accept Bob_Marley' command?


Re: Advanced registration system. - Jack.7331 - 06.04.2012

It's easy to make with a bunch of dialogs.
Also, what do you use to send to admins? Do you use foreach?
What's the variable that finds an admin? Or do you want it to be sent to RCON admins?


Re: Advanced registration system. - Shetch - 06.04.2012

Quote:
Originally Posted by Jack.7331
Посмотреть сообщение
It's easy to make with a bunch of dialogs.
Also, what do you use to send to admins? Do you use foreach?
What's the variable that finds an admin? Or do you want it to be sent to RCON admins?
I just use a loop that loops through all players and checks if they are an admin.

for(......
{
if(IsPlayerConnected(playerid))
{
if(Player[i][Admin] > 0)
{
SendClientMessage(playerid, COLOR_RED, "You're an admin.");
}

}
}


Re: Advanced registration system. - Jack.7331 - 06.04.2012

Well, here's the basic..

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
        {
    if(!inputtext == "Roleplay")
    {
    SendClientMessage(playerid, COLOR_WHITE, "Incorrect answer! You have been kicked.");
    Kick(playerid);
    else if(inputtext == "Roleplay");
    SendClientMessage(playerid, COLOR_LIGHTRED, "Correct!");
    ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "QUIZ", "What is PG short for?", "Proceed", "Cancel");
        }
        }
    return 1;
}
pawn Код:
public OnPlayerConnect(playerid)
{

//  if(/* Variable for new player goes here */)
    //{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "QUIZ!", "What is RP short for?", "Proceed", "Cancel");
    //}
    return 1;
}



Re: Advanced registration system. - Shetch - 06.04.2012

No, i mean you complete the quiz, and then it sends the answers to all of the admins.
The admin decides if the play can or can not play.


Re: Advanced registration system. - Jack.7331 - 06.04.2012

Quote:
Originally Posted by Shetch
Посмотреть сообщение
No, i mean you complete the quiz, and then it sends the answers to all of the admins.
The admin decides if the play can or can not play.
Ah, alright.
It's a simple case of once the last question is finished, it sends a message to admins, and sets the player's variable, such as "pToSpawn" or whatever, meaning when an admin does /accept "playerid", the variable is set to 2 and the player spawns.
I'll make an example in a sec.