[Include] Vehicle Category check
#1

I was so bored so i was thinking and thinking and ended up with this very easy to make include.
well here it goes


Features

This include can check if a Vehicle is a flying vehicle or a boat or a car or a bike!
this include might be useful


Natives
pawn Код:
native IsVehicleFlyingVehicle(vehicleid);
native IsVehicleLandVehicle(vehicleid);
native IsVehicleBoat(vehicleid);
native IsVehicleBike(vehicleid);
Example Usage
pawn Код:
#include <vehcheck> //add this at top
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    if(IsVehicleLandVehicle(vehicleid))
    {
        SendClientMessage(playerid,-1,"You are currently entering a vehicle which runs on land :P");
    }
    if(IsVehicleBoat(vehicleid))
    {
        SendClientMessage(playerid,-1,"You are currently entering a boat");
    }
    if(IsVehicleFlyingVehicle(vehicleid))
    {
        SendClientMessage(playerid,-1,"You are currently entering a flying vehicle!");
    }
    if(IsVehicleBike(vehicleid))
    {
        SendClientMessage(playerid,-1,"You are currently entering a bike");
    }
    return 1;
}
Bugs
No bugs reported

Download
Pastebin:
http://pastebin.com/ZS5KgTdT
Dropbox: https://www.dropbox.com/s/1kfe0wfwjy1xup2/vehcheck.inc
Report any bugs.
Thanks to ****** for the suggestion of the usage of arrays
and to JFF for helping me with the arrays

Thank you So much for reading!
Reply


Messages In This Thread
Vehicle Category check - by superrobot48 - 23.05.2014, 07:59
Re: Vehicle Category check - by superrobot48 - 23.05.2014, 08:19
Re: Vehicle Category check - by superrobot48 - 23.05.2014, 08:27
Re: Vehicle Category check - by JFF - 23.05.2014, 08:56
Re: Vehicle Category check - by superrobot48 - 23.05.2014, 09:04
Re: Vehicle Category check - by Konstantinos - 23.05.2014, 09:39
Re: Vehicle Category check - by superrobot48 - 23.05.2014, 09:42
Re: Vehicle Category check - by superrobot48 - 23.05.2014, 10:05
Re: Vehicle Category check - by Mark_Weston - 23.05.2014, 20:08

Forum Jump:


Users browsing this thread: 1 Guest(s)