[Include] Easy Vehicle Params
#1

Little comment :
-I know this isn't anything so 'special', it took me 15 minutes to make it :P

What does it do ? :
-This include is made to help you use 'GetVehicleParamsEx' and 'SetVehicleParamsEx' functions because they are so big. With this include, you have 14 different functions that allow you to use 'GetVehicleParamsEx' and 'SetVehicleParamsEx' easier.

Notes :
-I only checked will this have any errors/warnings while compiling, and it didn't. Please report if you find any bugs!
-No credits are required(doesn't men you shouldn't put them when you release some GM or FS with them, but they are not required)

Functions :
Код:
forward TogVehicleEngine(vehicleid, easy_engine);
forward TogVehicleLights(vehicleid, easy_lights);
forward TogVehicleAlarm(vehicleid, easy_alarm);
forward TogVehicleDoors(vehicleid, easy_doors);
forward TogVehicleBonnet(vehicleid, easy_bonnet);
forward TogVehicleBoot(vehicleid, easy_boot);
forward TogVehicleObjective(vehicleid, easy_objective);

forward GetVehicleEngine(vehicleid, easy_engine);
forward GetVehicleLights(vehicleid, easy_lights);
forward GetVehicleAlarm(vehicleid, easy_alarm);
forward GetVehicleDoors(vehicleid, easy_doors);
forward GetVehicleBonnet(vehicleid, easy_bonnet);
forward GetVehicleBoot(vehicleid, easy_boot);
forward GetVehicleObjective(vehicleid, easy_objective);
Usage :
Make sure you put '#include <easy_vehicle>' bellow '#include <a_samp>'
-Getting vehicle engine :
Код:
new easy_engine;
new vehicle = GetPlayerVehicleID(playerid);
GetVehicleEngine(vehicleid, easy_engine)
if(easy_engine == 1)
{ Vehicle Engine is ON !}
else
{Vehicle Engine is OFF !}
-Making /engine command :
Код:
if(strcmp(cmd, "/engine", true) == 0)
{
       new vehicleid = GetPlayerVehicleID(playerid);
       new engine;
       GetVehicleEngine(vehicleid, engine);
       if(engine == 1)
       {
              SetVehicleEngine(vehicleid, 0);
       }
       else
       {
              SetVehicleEngine(vehicleid, 1);
       }
       return 1;
}
Bugs:
-Shouldn't have any, anyway, report if you find that something isn't working !

Download :
-Download link (Windows/Linux) : http://www.mediafire.com/?4gjrvyxood1m2ep
Reply


Messages In This Thread
Easy Vehicle Params - by Ivan_Pantovic - 02.01.2011, 11:19
Re: Easy Vehicle Params - by DarrenReeder - 04.01.2011, 13:53
Re: Easy Vehicle Params - by Ivan_Pantovic - 04.01.2011, 20:03
Re: Easy Vehicle Params - by Jack Elliott - 05.01.2011, 00:20
Re: Easy Vehicle Params - by [FeK]Knife - 05.01.2011, 04:10
Re: Easy Vehicle Params - by Ivan_Pantovic - 05.01.2011, 17:33
Re: Easy Vehicle Params - by yarrum3 - 06.01.2011, 03:16
Re: Easy Vehicle Params - by Infamous - 06.01.2011, 04:01
Re: Easy Vehicle Params - by yarrum3 - 06.01.2011, 04:31
Re: Easy Vehicle Params - by Ivan_Pantovic - 07.01.2011, 23:49

Forum Jump:


Users browsing this thread: 1 Guest(s)