Dialog Response
#1

Код:
error 002: only a single statement (or expression) can follow each "case"
error 028: invalid subscript (not an array or too many subscripts): "response"
error 001: expected token: "}", but found "case"
fatal error 107: too many error messages on one line
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid 70)
    {
        if(
response)
        {
            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 
2:
            {
               
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 
3:
            {
               
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
Dialog Response - by Thanks - 02.01.2018, 08:00
Re: Dialog Response - by RogueDrifter - 02.01.2018, 08:12
Re: Dialog Response - by JesterlJoker - 02.01.2018, 08:36
Re: Dialog Response - by JaKe Elite - 02.01.2018, 08:52
Re: Dialog Response - by Thanks - 02.01.2018, 09:19

Forum Jump:


Users browsing this thread: 1 Guest(s)