public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid == Deathmatch)
{
case 1:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
}
case 1:
{
ShowPlayerDialog(playerid, LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
}
case 2:
{
ShowPlayerDialog(playerid, SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
{
if(dialogid == LSDM)
{
if(response)
{
new string[240];
format(string, sizeof(string), "has started LS carpark deathmatch, type /dm to join!");
SendClientMessageToAll(-1, string);
SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875);
GivePlayerWeapon(playerid, 28, 999999);
SetPlayerHealth(playerid, 100);
}
}
}
}
}
}
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)// SWITCHES BETWEEN THE DIALOG IDS
{
case Deathmatch:// DIALOG ID
{
if(response) // IF PLAYER CLICKED POSITIVE "YES"
{
switch(listitem)// SWITCHES BEETWEEN THE DIALOG ROWS LISTITEMS
{
case 0:// LISTITEM 1
{
ShowPlayerDialog(playerid, LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
}
case 1:
{
ShowPlayerDialog(playerid, LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
}
case 2:
{
ShowPlayerDialog(playerid, SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
}
}
}
}
case LSDM: // ANOTHER DIALOGID THAT IS CALLED
{
if(response)
{
//CODE HERE
}
}
case LVDM:
{
if(response)
{
//CODE HERE
}
}
case SFDM:
{
if(response)
{
//CODE HERE
}
}
}
return 1;
}
C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : warning 217: loose indentation C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : error 014: invalid statement; not in switch C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : warning 215: expression has no effect C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : error 001: expected token: ";", but found ":" C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : error 029: invalid expression, assumed zero C:\Users\BLACK\Desktop\Test\filterscripts\DeathMat ch.pwn(224) : fatal error 107: too many error messages on one line |
case LSDM: // ANOTHER DIALOGID THAT IS CALLED { if(response) { new string[240]; format(string, sizeof(string), "has started LS carpark deathmatch, type /dm to join!"); SendClientMessageToAll(-1, string); SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875); GivePlayerWeapon(playerid, 28, 999999); SetPlayerHealth(playerid, 100); } }
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(dialogid == Deathmatch)
{
case 1:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
}
case 1:
{
ShowPlayerDialog(playerid, LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
}
case 2:
{
ShowPlayerDialog(playerid, SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
}
}
}
}
}
case LSDM: // ANOTHER DIALOGID THAT IS CALLED
{
if(response)
{
new string[240];
format(string, sizeof(string), "has started LS carpark deathmatch, type /dm to join!");
SendClientMessageToAll(-1, string);
SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875);
GivePlayerWeapon(playerid, 28, 999999);
SetPlayerHealth(playerid, 100);
}
}
/*case LVDM:
{
if(response)
{
//CODE HERE
}
}
case SFDM:
{
if(response)
{
//CODE HERE
}*/
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])// DON'T TOUCH ANYTHING
{
switch(dialogid)// SWITCHES BETWEEN THE DIALOG IDS
{
case Deathmatch:// DIALOG ID
{
if(response) // IF PLAYER CLICKED POSITIVE "YES"
{
switch(listitem)// SWITCHES BEETWEEN THE DIALOG ROWS LISTITEMS
{
case 0:// LISTITEM 1
{
ShowPlayerDialog(playerid, LSDM, DIALOG_STYLE_MSGBOX, "LS carpark DM", "You have chosen LS carpark DM, do you want to start the death match?", "Yes", "No");
}
case 1:
{
ShowPlayerDialog(playerid, LVDM, DIALOG_STYLE_MSGBOX, "LV warehouse DM", "You have chosen LV warehouse DM, do you want to start the death match?", "Yes", "No");
}
case 2:
{
ShowPlayerDialog(playerid, SFDM, DIALOG_STYLE_MSGBOX, "SF tennis courts DM", "You have chosen SF tennis courts DM, do you want to start the death match?", "Yes", "No");
}
}
}
}
case LSDM: // ANOTHER DIALOGID THAT IS CALLED
{
if(response)
{
new string[240];
format(string, sizeof(string), "has started LS carpark deathmatch, type /dm to join!");
SendClientMessageToAll(-1, string);
SetPlayerPos(playerid, 2798.2031,-1465.9199,24.1875);
GivePlayerWeapon(playerid, 28, 999999);
SetPlayerHealth(playerid, 100);
}
}
case LVDM:
{
if(response)
{
//CODE HERE
}
}
case SFDM:
{
if(response)
{
//CODE HERE
}
}
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == DeathMatch)
{
if(Deathmatchon == true) return SendClientMessage(playerid, -1, "There is already a death match on!");
ShowPlayerDialog(playerid, Deathmatch, DIALOG_STYLE_LIST, "DeathMatch list", "LS carpark DM\nLV warehouse DM\nSF tennis courts" , "Yes", "No"); // Add more if you want!
}
return 1;
}
C:\Users\BLACK\Desktop\Test\filterscripts\DeathMatch.pwn(133) : error 033: array must be indexed (variable "Deathmatchon")
new Deathmatchon[MAX_PLAYERS]; |
if(pickupid == pickupdeathmatch) { //CODE }