[Include] [INC] Salmon Functions - sfunc.inc Version 1.01
#1

Here is a small include that I created with some of my functions in it,

Version 1.01
Changelog:
v1.01:
Changed the functions around and added new ones,
IsInCopCar(playerid) is now IsInPoliceVehicle(playerid)

(Note):
There are more then likely other functions that do the same thing, I just couldn't find them so I made my own.
I plan to add more as I create them.
Hope you like them!

Credits:
Salmon

Install:
Save to pawn/include
Add
pawn Код:
#include <sfunc>
to the top of your script
(assuming you saved it as sfunc.inc)

Function List:
(Returns 1 if the statement is true)
IsInPoliceVehicle(playerid) //Checks if the player is in a police vehicle, including helicopters and boats.
IsDrivingPoliceVehicle(playerid)
IsPassengerPoliceVehicle(playerid)
IsInESV(playerid) // Checks if the player is in an Emergency Service Vehicle, includes boats and helicopters.
IsDrivingESV(playerid)
IsPassengerESV(playerid)


Download:
Pastebin: http://pawn.pastebin.com/f2c24835c
.inc: sfunc.inc

Don't forget to comment!
Reply
#2

what functions? kick players out of a cop car?
Reply
#3

vehicleid == 407|| vehicleid == 544

Firetrucks aren't cop cars.
Reply
#4

Quote:
Originally Posted by xClumx_
vehicleid == 407|| vehicleid == 544

Firetrucks aren't cop cars.
Really i didn't know that LOOLOLOL
Reply
#5

Quote:
Originally Posted by Blauwbek
what functions? kick players out of a cop car?
This should remove anyone from a cop car if they are on the TEAM_CRIMS team
pawn Код:
public OnPlayerStateChange(playerid,newstate,oldstate)
{
if(gTeam[playerid] == TEAM_CRIMS)
{
if(newstate == 2)
{
if(IsInCopCar(playerid))
{
SendClientMessage(playerid, COLOR_RED,"You may not use this car.");
RemovePlayerFromVehicle(playerid);
}
}
}
}
but add
pawn Код:
new gTeam[MAX_PLAYERS];
to the top of your script

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)