SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 18/02/2009, 01:39 AM   #1
Salmon
Big Clucker
 
Join Date: Jan 2009
Posts: 55
Reputation: 0
Default [INC] Salmon Functions - sfunc.inc Version 1.01

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 Code:
#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!
__________________
Did you just shit on the floor?

Salmon is offline   Reply With Quote
Old 18/02/2009, 12:59 PM   #2
Blauwbek
Little Clucker
 
Join Date: Dec 2008
Posts: 5
Reputation: 0
Default Re: [INC] Salmon Functions - sfunc.inc

what functions? kick players out of a cop car?
Blauwbek is offline   Reply With Quote
Old 18/02/2009, 01:02 PM   #3
SilentMouse
Huge Clucker
 
Join Date: Jan 2009
Posts: 284
Reputation: 0
Default Re: [INC] Salmon Functions - sfunc.inc

vehicleid == 407|| vehicleid == 544

Firetrucks aren't cop cars.
SilentMouse is offline   Reply With Quote
Old 18/02/2009, 01:05 PM   #4
harrold
Huge Clucker
 
Join Date: Jan 2009
Posts: 260
Reputation: 0
Default Re: [INC] Salmon Functions - sfunc.inc

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

Firetrucks aren't cop cars.
Really i didn't know that LOOLOLOL
harrold is offline   Reply With Quote
Old 18/02/2009, 08:16 PM   #5
Salmon
Big Clucker
 
Join Date: Jan 2009
Posts: 55
Reputation: 0
Default Re: [INC] Salmon Functions - sfunc.inc

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 Code:
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 Code:
new gTeam[MAX_PLAYERS];
to the top of your script

__________________
Did you just shit on the floor?

Salmon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] LSF - Lorenc's Simple Functions (w/ gang/clan functions) Lorenc_ Includes 14 21/04/2018 04:06 AM
[GameMode] [GM] - [RnD] Street Racers `N Drifters (New Version - latest version) Johny_Rocker Gamemode Scripts 23 10/12/2015 09:53 AM
[INC/FS] Carlton's MapIcon Streamer | Version 2.0 | 16 functions Carlton Filterscripts 18 10/08/2010 06:16 PM


All times are GMT. The time now is 11:19 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.