SA-MP Forums Archive
[Include] Easy Vehicle Params - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Easy Vehicle Params (/showthread.php?tid=205797)



Easy Vehicle Params - Ivan_Pantovic - 02.01.2011

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


Re: Easy Vehicle Params - DarrenReeder - 04.01.2011

Thanks, I was just about to make this but searched first, so now ill just use this..

-Thanks


Re: Easy Vehicle Params - Ivan_Pantovic - 04.01.2011

No problem, tell me if you find any bugs.


Re: Easy Vehicle Params - Jack Elliott - 05.01.2011

nice ... ill give it a try now


Re: Easy Vehicle Params - [FeK]Knife - 05.01.2011

Good work!
I am using this include

I liked the function GetVehicleDoors

10/10


Re: Easy Vehicle Params - Ivan_Pantovic - 05.01.2011

Quote:
Originally Posted by [FeK]Knife
Посмотреть сообщение
Good work!
I am using this include

I liked the function GetVehicleDoors

10/10
Thanks


Re: Easy Vehicle Params - yarrum3 - 06.01.2011

I have never use a Include before can someone tell me how

EDIT i keep getting

C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(34900) : error 017: undefined symbol "SetVehicleEngine"
C:\Users\Ryan\Desktop\World Wide RolePlay\gamemodes\WWRP.pwn(34904) : error 017: undefined symbol "SetVehicleEngine"


Re: Easy Vehicle Params - Infamous - 06.01.2011

In your gamemode place #include <easy_vehicle> under #include <a_samp>. Like this:

pawn Код:
#include <a_samp>
#include <easy_vehicle>



Re: Easy Vehicle Params - yarrum3 - 06.01.2011

Quote:
Originally Posted by Infamous
Посмотреть сообщение
In your gamemode place #include <easy_vehicle> under #include <a_samp>. Like this:

pawn Код:
#include <a_samp>
#include <easy_vehicle>
i DID and i still get it.


Re: Easy Vehicle Params - Ivan_Pantovic - 07.01.2011

Quote:
Originally Posted by yarrum3
Посмотреть сообщение
i DID and i still get it.
Did you try to download samp 0.3c server package and replace includes ?