Quote:
Originally Posted by Konstantinos
The vehicle specified does not exist, GetVehicleModel returns 0 and subtracting from it goes to invalid index -400.
PHP код:
#if !defined strcpy
#define strcpy(%0,%1) strcat((%0[0] = EOS, %0), %1)
#endif
PHP код:
GetVehicleName(vehicleid)
{
new String[32] = "N/A", modelid = GetVehicleModel(vehicleid);
if (!modelid) return String;
strcpy(String, VehicleNames[modelid - 400], sizeof(String));
return String;
}
|
Quote:
Originally Posted by Konstantinos
It shows N/A that the vehicle does not exist and prevents the run time error 4.
DB[playerid][Vehicle1] is 0, you need to assign a vehicle ID on it.
|
nope mate, my DB[playerid][Vehicle1] = 522 which is NRG