[FilterScript] Simple on connect rules dialog
#1

Simple on connect rules dialog
Here is what you have to do
Open Pawno > Ctrl + f > search for OnPlayerConnect

replace this with it
pawn Код:
public OnPlayerConnect(playerid)
{
   ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "server name Server Rules", "Do Not Ask For admin status\nYou cannot quit avoid admin punshiment\nDo not deathmatch\nDo not hack\nDo not flame\nDo not cop hunt", "Accept ", "Decline");
   return 1;
}
now search for OnDialogResponse
and replace this
pawn Код:
{
    if(dialogid == DIALOG_STYLE_MSGBOX)
    {
        if(response) // If they clicked 'Yes' or pressed enter
        {
            SendClientMessage(playerid, COLOR_GREEN, "Thank you for agreeing to the server rules!");
        }
        else // Pressed ESC or clicked cancel
        {
            SendClientMessage(playerid, COLOR_RED, "You MUST agree to the server rules to play here.");
            Kick(playerid);
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }

    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
and go up and #define DIALOG 1
credits : back to me its simple but it gonna help newbies
Reply
#2

Nice
Reply
#3

thanks Elmelo
Reply
#4

Nice but u need to add a stock of KickWithMessage OR It wont show the kick message as it is a part of 0.3x
Reply
#5

this is from samp wiki
Reply
#6

Not bad useful but simple also add what Gamer_007 just said
Reply
#7

nice script
Reply
#8

pawn Код:
if(dialogid == DIALOG_STYLE_MSGBOX)
I'm sure you meant this :
pawn Код:
if(dialogid == 1)
Reply
#9

well thanks all
Reply
#10

Nice and simple
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)