GetVehicleParamsEx problem
#1

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]);
        }
Reply
#2

Ouah, sorry.
This is sound good, my bad.
So this problem is fixed - I notice.
Reply
#3

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)