Question about dialogs
#1

Basically I want it to be so when I type in /kick, a (input)dialog pops up where you can type in the id of the person yo want to kick. I know its a bit confusing, but whoeever does it gets a virtual cookie :')
Reply
#2

It's rather quite easy, I'll create an example of how to do this for you.

Add this to your /kick command:
pawn Код:
ShowPlayerDialog(playerid, 666,DIALOG_STYLE_INPUT,"Kick","Enter the ID of the person you want to kick","Kick","Cancel");
and then inside OnDialogResponse, add this:

pawn Код:
if(dialogid == 666) {

    if(!response) return 1;

    new
        iReturn = strval(inputtext);

    if(IsPlayerConnected(iReturn)) {
        Kick(iReturn);
    }
}
Reply
#3

thanks You ge a virtuak cikie
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)