listen here is an example of making rules dialog when a player join the server , if he pressed accept , he can play , if he pressed decline , he is kicked :
OnPlayerConnect :
Код:
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Rules :","Golden Rule : Respect all the players and admins. \nNo Hacking or Cheating. \nNo Teamkilling. \nNo Drive-By Or Blade-Killing. \nNo Glitching or Bugging. \nNo Spamming. \nNo Swearing.\n______________________________________________________","Accept","Decline");
return 1;
}
OnDialogResponse (bottom of script)
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pName3[MAX_PLAYER_NAME];
{
if(dialogid == 0)
{
if(response == 0)
{
SendClientMessage(playerid, 0xAA3333AA, "You MUST Accept Those Rules Or Be Kicked!");
Kick(playerid);
new stringsys [256];
GetPlayerName(playerid, pName3, sizeof(pName3));
format(stringsys, sizeof(stringsys), "[SYSTEM] %s Has Been Kicked For Not Accepting Rules!", pName3);
SendClientMessageToAll(0xAA3333AA, stringsys);
}
if(response == 1)
{
SendClientMessage(playerid, 0xAA3333AA, "Thank You For Accepting Our Rules.");
}
return 1;
}
return 0;
}
}
________
Xxx videos free