18.01.2019, 17:54
Hi everyone!
I have problem with GetVehicleParamsEx function.
I need get engine status. (after weeks i create this function and she's return 0 or 1).
Now if I check engine from parametr "GetVehicleParamsEx" is retrun -1.
How?
"If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset')."
I read samp wiki about this function but i don't know what is happening.
I use on start gamemode "ManualVehicleEngineAndLights();".
Can you help me?
Thanks for all.
I have problem with GetVehicleParamsEx function.
I need get engine status. (after weeks i create this function and she's return 0 or 1).
Now if I check engine from parametr "GetVehicleParamsEx" is retrun -1.
How?
"If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be -1 ('unset')."
I read samp wiki about this function but i don't know what is happening.
I use on start gamemode "ManualVehicleEngineAndLights();".
Can you help me?
Thanks for all.
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
new uid = VehicleSAMP[vehicleid];
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == VEHICLE_PARAMS_OFF)
{
new string[328];
format(string, sizeof string, "simple text of string");
PlayerTextDrawSetString(playerid, td_vehicle_info[playerid], string);
PlayerTextDrawShow(playerid, td_vehicle_info[playerid]);
}
if(engine == VEHICLE_PARAMS_ON)
{
PlayerTextDrawSetString(playerid, td_vehicle_update[playerid], "simple text of string");
PlayerTextDrawShow(playerid, td_vehicle_update[playerid]);
PlayerTextDrawShow(playerid, td_vehicle_update_model[playerid]);
}