09.06.2015, 13:26
Load crashdetect plugin and compile with -d3 flag (https://github.com/Zeex/samp-plugin-...ith-debug-info) because I'm pretty sure a run time error 4 is what causes your problem and more specific, this function: GetVehicleName.
You can prevent it for now using this:
but fixing the function is recommended so it won't happen in other places as well.
You can prevent it for now using this:
PHP код:
CMD:vmenu(playerid, params[])
{
new finale[150], id[3];
id[0] = PlayerInfo[playerid][IDVeicolo],
id[1] = PlayerInfo[playerid][IDVeicolo2],
id[2] = PlayerInfo[playerid][IDVeicolo3];
for (new i; i != sizeof (id); ++i)
{
if (!id[i] || !GetVehicleModel(id[i])) strcat(finale, "Slot libero\n", sizeof (finale));
else format(finale, sizeof(finale), "%s - (FC 0%d LV)\n", GetVehicleName(id[i]), id[i]);
}
ShowPlayerDialog(playerid, DIALOG_VMENU, DIALOG_STYLE_LIST, "Menщ veicolo", finale, "Seleziona", "Esci");
return 1;
}