/GiveAdmin /GiveVip [Some Help]
#1

Hello Everybody.

I Have A Problem I Want Make Administrator Commands.
With This Admin Commands You Can Set Player Admin Set Vip And Else.
But I Have My Codes With Text Command I Want Make It With Gui.
I Want It Looks Like This :

Код:
ShowPlayerDialog(playerid,1111,DIALOG_STYLE_LIST,"SET Remove Admin Vip:,","Give Admin To Player\nRemove Player Admin\nGive Player Vip\nRemove Player Vip","Choose","Exit");
return 1;
}
And Then You Choose Something Of This Like Give Admin To Player

Show For You Dialog With TEXT: Enter Player Name

And Then You Enter The Player Name To Player Give Admin Or Vip.

I Want Make This And With Remove Vip,Admin.


I Want Make It But I Don't Know How To Make It If Someone Can Help With It Please Help.

Thanks.

Admin Code :

Код:
playerDB[playerid][admin]
Vip Code :

Код:
playerDB[playerid][vip]
Please Help My I Need It.. :S
Reply
#2

You can make them. It's better to do it yourself, you'll learn a lot!

Use this: OnDialogResponse
To get control of the player's dialog.

Example:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case 1111:
        {
            if(!response) return SendClientMessage(playerid, 0xFF0000FF, "Admin menu closed.");

            switch(listitem)
            {
                case 0:
                {
                    ShowPlayerDialog(playerid, 334, DIALOG_STYLE_INPUT, "Give Admin",
                    "Please enter the ID of the player you want to give admin..", "OK", "Cancel");
                }
            }

        }
    }
    return 0;
}
Reply
#3

The function you'd need to use is OnPlayerDialogReponse.
Reply
#4

Quote:
Originally Posted by Fat
Посмотреть сообщение
The function you'd need to use is OnPlayerDialogReponse.
Learn PAWN before helping. It's called "callback"
Reply
#5

Can You Show More ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)