Doesn't get the vehicle name (+REP) [quick one]
#6

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(StringVehicleNames[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
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)