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

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
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)
so how can I do it over here?

PHP код:
if(IsPlayerInRangeOfPoint(playerid,3,1481.9901,-1796.1001,17.0359)){
format(String,sizeof(String),"Slot 1: %s\n\
Slot 2: %s\n\
Slot 3: %s\n\
Slot 4: %s\n\
Slot 5: %s\n\
Slot 6: %s\n\
Slot 7: %s\n\
Slot 8: %s\n\
Slot 9: %s\n\
Slot 10: %s"
,GetVehicleName(DB[playerid][Vehicle1],1),
GetVehicleName(DB[playerid][Vehicle2]),
GetVehicleName(DB[playerid][Vehicle3]),
GetVehicleName(DB[playerid][Vehicle4]),
GetVehicleName(DB[playerid][Vehicle5]),
GetVehicleName(DB[playerid][Vehicle6]),
GetVehicleName(DB[playerid][Vehicle7]),
GetVehicleName(DB[playerid][Vehicle8]),
GetVehicleName(DB[playerid][Vehicle9]),
GetVehicleName(DB[playerid][Vehicle10]));
DLG(playerid,17,DIALOG_STYLE_LIST,"Pick a slot",String,"Pick","Cancel"); 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)