24.08.2012, 13:00
I have a personal vehicle system where you can buy a vehicle using a dialog.
When you press "YES" on the dialog you buy the vehicle but when you press "NO" =>Server closed the connection. WHY?
When you press "YES" on the dialog you buy the vehicle but when you press "NO" =>Server closed the connection. WHY?
Код:
}
else
{
new id = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, id) < 1)
{
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
Код:
case DIALOG_VEHICLE_BUY:
{
new vehicleid = GetPVarInt(playerid, "DialogValue1");
new caption[32], info[256];
format(caption, sizeof(caption), "Vehicle ID %d", vehicleid);
format(info, sizeof(info), "This vehicle is for sale ($%d)\nWould you like to buy it?", VehicleValue[vehicleid]);
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, caption, info, "Yes", "No");
}

