02.01.2018, 08:00
Код:
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(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid = 70)
{
if(response)
{
case 1:
{
SendClientMessage(playerid, Grey, "You are now In Deagle Arena!");
SendClientMessage(playerid, Yellow, "You can change your arena Type: /switcha or (/switcharena)!");
GivePlayerWeapon(playerid, 24, 10000);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid, 288.745971,169.350997,1007.171875);
SetPlayerInterior(playerid, 3);
}
case 2:
{
SendClientMessage(playerid, Grey, "You are now in Sawnoff + Deagle Arena!");
SendClientMessage(playerid, Yellow, "You can change your arena Type: /switcha or (/switcharena)!");
GivePlayerWeapon(playerid, 24, 10000);
GivePlayerWeapon(playerid, 26, 10000);
SetPlayerHealth(playerid, 100);
SetPlayerPos(playerid,1710.433715,-1669.379272,20.225049);
SetPlayerInterior(playerid, 18);
}
case 2:
{
SendClientMessage(playerid, Grey, "You are now in Freeroam arena!");
SendClientMessage(playerid, Yellow, "You can change your arena Type: /switcha or (/switcharena)!");
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 99999999);
SetPlayerPos(playerid, -1465.268676,1557.868286,1052.531250);
SetPlayerInterior(playerid, 14);
}
case 3:
{
SendClientMessage(playerid, Grey, "You are now in Minigun Arena! Your health is now 250%.");
SendClientMessage(playerid, Yellow, "You can change your arena Type: /switcha or (/switcharena)!");
GivePlayerWeapon(playerid, 38, 100000);
SetPlayerHealth(playerid, 250);
SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875);
SetPlayerInterior(playerid, 10);
}
}
}
return 1;
}