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

That's the mistake, the function is supposed to get a vehicle ID and not a vehicle model ID.

PHP код:
GetVehicleName(vehicleidmodel 0)
{
    new 
String[32] = "N/A";
    if(!
model)
    {
        new 
modelid GetVehicleModel(vehicleid);
        if(
modelidstrcpy(StringVehicleNames[modelid 400], sizeof(String));
    }
    else
    {
        if(
400 <= vehicleid <= 611strcpy(StringVehicleNames[modelid 400], sizeof(String));
    }
    return 
String;

Use the second parameter when you want to pass the model ID. Examples:
pawn Код:
GetVehicleName(vehicleid)
GetVehicleName(modelid, 1)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)