SA-MP Forums Archive
/GiveAdmin /GiveVip [Some Help] - 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: /GiveAdmin /GiveVip [Some Help] (/showthread.php?tid=285072)



/GiveAdmin /GiveVip [Some Help] - Serifukas - 22.09.2011

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


Re: /GiveAdmin /GiveVip [Some Help] - iPLEOMAX - 22.09.2011

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;
}



Re: /GiveAdmin /GiveVip [Some Help] - Fat - 22.09.2011

The function you'd need to use is OnPlayerDialogReponse.


Re: /GiveAdmin /GiveVip [Some Help] - Max_Coldheart - 22.09.2011

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


Re: /GiveAdmin /GiveVip [Some Help] - Serifukas - 22.09.2011

Can You Show More ?