Dialog Rules - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Rules (
/showthread.php?tid=186563)
Dialog Rules -
jonnyboy - 29.10.2010
How can i make this to an Dialog
pawn Код:
if(!strcmp(cmdtext,"/rules",true))
{
SendClientMessage(playerid, 0xAA3333AA, "1.Cheating and hacking - Permban");
SendClientMessage(playerid, 0xAA3333AA, "2.Write on the forum if you want help!");
SendClientMessage(playerid, 0xAA3333AA, "http://freeroam-samp.ucoz.com/forum");
SendClientMessage(playerid, 0xAA3333AA, "3.Race on LS only");
SendClientMessage(playerid, 0xAA3333AA, "4.Respect The Administrators and the moderators!");
SendClientMessage(playerid, 0xAA3333AA, "5.Report asap if you see glitch/bug/cheaters/hackers!");
return 1;
}
return 0;
}
i rlly want one with apply and deny
Apply - Closes it
Deny - Kicked from server
anyone know how to make it dialog
Re: Dialog Rules -
iJumbo - 29.10.2010
when u want the dialog show? in on player connect?
pawn Код:
ShowPlayerDialog
(playerid,
100,DIALOG_STYLE_MSGBOX,
"Rules",
"1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!",
"Agree",
"Deny");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 100)
{
if(response)
{
SendClientMessageToAll(COLOR_YELLOW,"thx for accept rules");
}
else if(response == 0)
{
SendClientMessageToAll(COLOR_YELLOW,"you have not accept the rules kick");
Kick(playerid);
}
}
return 1;
}
Re: Dialog Rules -
jonnyboy - 30.10.2010
Quote:
Originally Posted by gigi1223
when u want the dialog show? in on player connect?
pawn Код:
ShowPlayerDialog (playerid, 100,DIALOG_STYLE_MSGBOX, "Rules", "1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!", "Agree", "Deny");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 100) { if(response) { SendClientMessageToAll(COLOR_YELLOW,"thx for accept rules"); } else if(response == 0) { SendClientMessageToAll(COLOR_YELLOW,"you have not accept the rules kick"); Kick(playerid); } } return 1; }
|
yep, and thx for the pawn code
Re: Dialog Rules -
Incog_Nito - 14.04.2012
Quote:
Originally Posted by [ISS]jumbo
when u want the dialog show? in on player connect?
pawn Код:
ShowPlayerDialog (playerid, 100,DIALOG_STYLE_MSGBOX, "Rules", "1.Cheating and hacking - Permban\n2.Write on the forum if you want help!\nhttp://freeroam-samp.ucoz.com/forum\n3.Race on LS only\n4.Respect The Administrators and the moderators!\n5.Report asap if you see glitch/bug/cheaters/hackers!", "Agree", "Deny");
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == 100) { if(response) { SendClientMessageToAll(COLOR_YELLOW,"thx for accept rules"); } else if(response == 0) { SendClientMessageToAll(COLOR_YELLOW,"you have not accept the rules kick"); Kick(playerid); } } return 1; }
|
Could somebody please tell me where exactly do I place the 2nd part? I know its in my gamemode but where exactly?
Re: Dialog Rules -
Jonny5 - 14.04.2012
just look for the function
OnDialogResponse
thats where it goes
Re: Dialog Rules -
Incog_Nito - 14.04.2012
Quote:
Originally Posted by Jonny5
just look for the function
OnDialogResponse
thats where it goes
|
I did a text search for OnDialogResponse and its not there.
Re: Dialog Rules -
Jonny5 - 14.04.2012
then just add it,
it should be in your gamemode
Re: Dialog Rules -
Incog_Nito - 14.04.2012
Ok that worked. Thanks!
Re: Dialog Rules -
Incog_Nito - 14.04.2012
For some reason, the message given when the player accepts the rules is shown to everyone rather than JUST the one player who needs to see it. How can I fix this?
Re: Dialog Rules -
GeneraalxArmy - 20.05.2014
Change the SendClientMessageToAll to SendClientMessage at DialogResponse