13.05.2011, 14:23
Or, more efficient:
pawn Code:
public OnPlayerSpawn(playerid)
{
TogglePlayerControllable(playerid, false);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Rules here", "Understood", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(!response) // If he clicked on "Cancel"
{
Kick(playerid); // It will kick him
return 1;
} else {
TogglePlayerControllable(playerid, true);
}
return 1;
}
return 0;
}