28.06.2016, 12:38
There is something that most people tend to forget and that is if a vehicle that does not exist given, it will basically try to get the name from index -400 which will cause run time error 4. To simple avoid it:
---
Your code:
There should be a comma instead of parentheses before GetName function.
pawn Код:
GetVehicleName(vehicleid)
{
new v_name[17], modelid = GetVehicleModel(vehicleid);
if (modelid) strcat(v_name, VehicleNames[modelid - 400]);
return v_name;
}
Your code:
Код:
"%s attempts to start the engine of %s")GetName(playerid)