Dialog Rules
#1

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
Reply
#2

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;
}
Reply
#3

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
Reply
#4

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?
Reply
#5

just look for the function

OnDialogResponse

thats where it goes
Reply
#6

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.
Reply
#7

then just add it,

it should be in your gamemode
Reply
#8

Ok that worked. Thanks!
Reply
#9

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?
Reply
#10

Change the SendClientMessageToAll to SendClientMessage at DialogResponse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)