GetVehicleParamsEx problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GetVehicleParamsEx problem (
/showthread.php?tid=663006)
GetVehicleParamsEx problem -
Robson04 - 18.01.2019
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.
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]);
}
Re: GetVehicleParamsEx problem -
Robson04 - 18.01.2019
Ouah, sorry.
This is sound good, my bad.
So this problem is fixed - I notice.
Re: GetVehicleParamsEx problem -
Robson04 - 18.01.2019
Quote:
Originally Posted by ******
OK. That seems quite clear - you haven't used `SetVehicleParamsEx`.
|
Thanks for the information. I've already solved this problem, but thanks!