OnDialogResponse
#1

Idk when I pressed ANY OF THEM I'll still in 1place!~
Код:
ShowPlayerDialog(playerid, 70, DIALOG_STYLE_LIST, "Choose an Arena", "1- Deagle Only\n2-Sawn-off + Deagle\n3-Freeroam Arena\n4-Minigun","OK", "");
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid == 70)
    {
        case 
5// Dialog ID 70
        
{
            if(
response)
            {
                switch(
listitem)
                {
                    case 
1:
                    {
                        
SendClientMessage(playeridGrey"You are now In Deagle Arena!");
                        
SendClientMessage(playeridYellow"You can change your arena Type: /switcha or (/switcharena)!");
                        
GivePlayerWeapon(playerid2410000);
                        
SetPlayerHealth(playerid100);
                        
SetPlayerPos(playerid288.745971,169.350997,1007.171875);
                        
SetPlayerInterior(playerid3);
                    }
                    case 
2:
                    {
                        
SendClientMessage(playeridGrey"You are now in Sawnoff + Deagle Arena!");
                        
SendClientMessage(playeridYellow"You can change your arena Type: /switcha or (/switcharena)!");
                        
GivePlayerWeapon(playerid2410000);
                        
GivePlayerWeapon(playerid2610000);
                        
SetPlayerHealth(playerid100);
                        
SetPlayerPos(playerid,1710.433715,-1669.379272,20.225049);
                        
SetPlayerInterior(playerid18);
                    }
                    case 
3:
                    {
                        
SendClientMessage(playeridGrey"You are now in Freeroam arena!");
                        
SendClientMessage(playeridYellow"You can change your arena Type: /switcha or (/switcharena)!");
                        
ResetPlayerWeapons(playerid);
                        
SetPlayerHealth(playerid99999999);
                        
SetPlayerPos(playerid, -1465.268676,1557.868286,1052.531250);
                        
SetPlayerInterior(playerid14);
                    }
                    case 
4:
                    {
                        
SendClientMessage(playeridGrey"You are now in Minigun Arena! Your health is now 250%.");
                        
SendClientMessage(playeridYellow"You can change your arena Type: /switcha or (/switcharena)!");
                        
GivePlayerWeapon(playerid38100000);
                        
SetPlayerHealth(playerid250);
                        
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
                        
SetPlayerInterior(playerid10);
                    }
                }
            }
        }
    }
    return 
1;

Reply


Messages In This Thread
OnDialogResponse - by Thanks - 04.01.2018, 06:32
Re: OnDialogResponse - by RedRex - 04.01.2018, 07:07
Re: OnDialogResponse - by Thanks - 04.01.2018, 07:26
Re: OnDialogResponse - by DevHarden - 04.01.2018, 07:32
Re: OnDialogResponse - by Thanks - 04.01.2018, 10:53
Re: OnDialogResponse - by Lirbo - 04.01.2018, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)