24.11.2010, 17:43
You didn't tell the server about another possible "else" statement;
That should work.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case 1:
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cars","1. Elegy","Continue", "Cancel");
}
}
else SendClientMessage(playerid, COLOR_RED, "You canceled!");
}
case 2:
{
if(response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You dont have enough money for the elegy!");
GivePlayerMoney(playerid, -5000);
new Float:X,Float:Y,Float:Z,Float:ROT;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle (playerid,ROT);
SpawnedVehicles[playerid] = CreateVehicle(562, X+4,Y,Z,ROT,-1,-1,60);
}
}
}
else SendClientMessage(playerid, COLOR_RED, "You canceled!");
}
}
return 1;
}