01.12.2014, 18:07
Hello, i've been working on a new death match and all is well, it's just this response, it all works fine, it's just not teleporting me nor giving me a weapon when i press yes on the dialog, i am not that good with responses, so this is me trying to learn it.
If you can tell me where i am going wrong that would be great, thank you!
pawn Code:
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;
}