[Include] [INC] Salmon Functions - sfunc.inc Version 1.01 - 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] [INC] Salmon Functions - sfunc.inc Version 1.01 (
/showthread.php?tid=65968)
[INC] Salmon Functions - sfunc.inc Version 1.01 -
Salmon - 18.02.2009
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
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!
Re: [INC] Salmon Functions - sfunc.inc -
Blauwbek - 18.02.2009
what functions? kick players out of a cop car?
Re: [INC] Salmon Functions - sfunc.inc -
SilentMouse - 18.02.2009
vehicleid == 407|| vehicleid == 544
Firetrucks aren't cop cars.
Re: [INC] Salmon Functions - sfunc.inc -
harrold - 18.02.2009
Quote:
Originally Posted by xClumx_
vehicleid == 407|| vehicleid == 544
Firetrucks aren't cop cars.
|
Really i didn't know that LOOLOLOL
Re: [INC] Salmon Functions - sfunc.inc -
Salmon - 18.02.2009
Quote:
Originally Posted by Blauwbek
what functions? kick players out of a cop car? ![smiley](images/smilies/question.gif)
|
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
to the top of your script