#define Dialog_Rules 1 //Rules dialog
public OnPlayerConnect(playerid)
{
ShowPlayerDialog(playerid,Dialog_Rules,0,"Server Rules:","1.Accept the rules if you want to play in the server!","Accept", "Decline");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case Dialog_Rules:
{
if(!response)
{
new string[128], name[40];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has been kicked for declining the server rules!", name);
return 1;
}
SendClientMessageToAll(-1,"You have accepted the rules, Welcome to the server");
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case Dialog_Rules:
{
if(!response)
{
new string[128], name[40];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has been kicked for declining the server rules!", name);
SendClientMessageToAll(0xFF0000FF, string); // Added
return 1;
}
SendClientMessage(playerid,-1,"You have accepted the rules, Welcome to the server");
}
}
return 1;
}
SendClientMessageToAll(0xFF0000FF, string); // Added
Kick(playerid);
underneath of
pawn Код:
pawn Код:
|