[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
#2

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

-Thanks
Reply
#3

No problem, tell me if you find any bugs.
Reply
#4

nice ... ill give it a try now
Reply
#5

Good work!
I am using this include

I liked the function GetVehicleDoors

10/10
Reply
#6

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

I liked the function GetVehicleDoors

10/10
Thanks
Reply
#7

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"
Reply
#8

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

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

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.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)