09.04.2013, 20:18
Simple on connect rules dialog
Here is what you have to doOpen 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;
}
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.
}
credits : back to me its simple but it gonna help newbies