Need a little help
#1

Hi,
How can i do like when i launches my server,it show me Server Rules dialog menu and then player press "next" button,it show me login or register screen.


Also how can i change my background on login screen.
Reply
#2

Just show a dialog with the 'rules' and if there's a response, check if it's a registered account / registered like you would. For example:

PHP код:
#define DIALOG_SERVER_RULES (1)
public OnPlayerConnect(playerid)
{
    new 
        
rule_str[128]
    ;
    
    
strcat(rule_str"Don't cheat obviously...\n"); 
    
strcat(rule_str"Don't break rules...\n");
    
    
ShowPlayerDialog(playeridDIALOG_SERVER_RULESDIALOG_STYLE_MSGBOX"Rule confirmation"rule_str"Confirm""Cancel"); 
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_SERVER_RULES:
        {
            if(
response)
            {
                
//This is where your code to check if their account exists would go.
                
return 1;
            }
            else 
Kick(playerid);
        }
    }
    return 
0;

And different "backgrounds" are just textdraw sprites.

https://sampwiki.blast.hk/wiki/TextDraw_Sprites
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)