[Tutorial]DIALOG_STYLE_MSGBOX (Server Rules)
#1

Good some friends of you entered a servant and picture was jumping them with the rules of the server?

I always wanted to have one of this THE SOLUTION HERE!

Good it is a tutorial as it does it

1. We go to

Код:
OnPlayerConnect
2. add

Код:
ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Server Name","Rules server:\nRule1\nRule2\nRule3","Accept","Cancel");
Info: \n: it is in use for leaving spaces or lines between every message

3. Did not you accept the rules? KICK

We go to

Код:
OnDialogResponse
If you do not have it add it this way:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
And we place after it the following thing

i
Код:
f(dialogid == 0)
{
if(response == 0)
{
SendClientMessage(playerid, NAME_COLOR, "You were expelled for not accepting the rules");
Kick(playerid);
new stringsys [256];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(stringsys, sizeof(stringsys), "[News!]** %s It has been expelled for not accepting the rules", pName);
SendClientMessageToAll(NAME_COLOR, stringsys);
}
if(response == 1)
{
SendClientMessage(playerid, NAME_COLOR, "Thank you for accepting the rules");
}

return 1;
}
Info:

They must define the colors and place the text that you want!

Images:







Credits: I

Bugs: If they find algun bug report, If they do not like me or this one incompletely or already this post report

*FilterScript

http://www.megaupload.com/?d=LEQMA72Y

Sorry for my bad english i am Colombian
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)