[FilterScript] Simple on connect rules dialog - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple on connect rules dialog (
/showthread.php?tid=429475)
Simple on connect rules dialog -
mgd - 09.04.2013
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
Re: Simple on connect rules dialog -
ElMelo - 09.04.2013
Nice
Re: Simple on connect rules dialog -
mgd - 10.04.2013
thanks Elmelo
Re: Simple on connect rules dialog -
Gamer_007 - 10.04.2013
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
Re: Simple on connect rules dialog -
kalanerik99 - 10.04.2013
this is from samp wiki
Re: Simple on connect rules dialog -
Fredrick - 10.04.2013
Not bad useful but simple

also add what Gamer_007 just said
Re: Simple on connect rules dialog -
matthew1211 - 10.04.2013
nice script
Re: Simple on connect rules dialog -
greentarch - 10.04.2013
pawn Код:
if(dialogid == DIALOG_STYLE_MSGBOX)
I'm sure you meant this :
Re: Simple on connect rules dialog -
mgd - 10.04.2013
well thanks all
Re: Simple on connect rules dialog -
x96664 - 10.04.2013
Nice and simple