20.01.2008, 16:58
This set of includes allows you to easily add police department gates, its aimed at newcomers as it is simple for experienced scripters.
Usage:
Save the .inc file in to your pawno/includes folder
To add gates there are 3 different lines, AddLSPDGate, AddSFPDGate and AddLVPDGate. the bits in bold being the city name kindof.
Under this line, #include <a_samp> put this #include <w_Gates>
Under OnGameModeInit put any of the Add**PDGate, i will use the LS gate here
Now on to opening and closing, using a command we can simply do this
and thats all you need to add gates to LS police department, it is simple to add to other police deaprtments, just replace the LS part with either SF(San Fierro) or LV(Las Venturas)
_________________________________________________
New Version:
Hey, made a new version, even better. Now it checks if they are close to a gate and you can set it to auto close.
/*
native AddLSPDGate();
native OpenLSPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseLSPDGate(playerid,Float:Speed);
native
native AddSFPDGate();
native OpenSFPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseSFPDGate(playerid,Float:Speed);
native
native AddLVPDGate();
native OpenLVPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseLvPDGate(playerid,Float:Speed);
*/
Pretty much the same deal but with 3 new parameters
_________________________________________________
any more questions ask here.
Download
v0.1a - Out of date
http://mihd.net/3qn1ka
http://www.sendspace.com/file/ezdfjn
http://paike.pri.ee/FS/w_Gates.rar thanks to paike!
v0.1b
http://pastebin.com/f1f13e3af
http://www.sendspace.com/file/iaysju
http://www.turboupload.com/download/...En/w_Gates.inc
http://rapidshare.com/files/96561691/w_Gates.inc.html - Sorry about the rapidsux
Example filterscripts
http://pastebin.com/f7d04e0f0 ls gates
http://pastebin.com/f764521a8 sf gates
http://pastebin.com/fb77fdf2 lv gates
Enjoy.
WeeDarr
Usage:
Save the .inc file in to your pawno/includes folder
To add gates there are 3 different lines, AddLSPDGate, AddSFPDGate and AddLVPDGate. the bits in bold being the city name kindof.
Under this line, #include <a_samp> put this #include <w_Gates>
Under OnGameModeInit put any of the Add**PDGate, i will use the LS gate here
Code:
public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); AddLSPDGate(); // thats all it is to add the gates. return 1; }
Code:
if (strcmp("/open", cmdtext, true, 10) == 0) { OpenLSPDGate(3.0); // 3.0 being the speed return 1; } if(strcmp("/close", cmdtext, true, 10) == 0) { CloseLSPDGate(3.0); // 3.0 being the speed return 1; }
_________________________________________________
New Version:
Hey, made a new version, even better. Now it checks if they are close to a gate and you can set it to auto close.
/*
native AddLSPDGate();
native OpenLSPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseLSPDGate(playerid,Float:Speed);
native
native AddSFPDGate();
native OpenSFPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseSFPDGate(playerid,Float:Speed);
native
native AddLVPDGate();
native OpenLVPDGate(playerid,Float:Speed, bool: autoclose, time);
native CloseLvPDGate(playerid,Float:Speed);
*/
Pretty much the same deal but with 3 new parameters
- Playerid - For the PlayerToPoint
- bool: autoclose - put 1 for auto closing, 0 for no autoclosing
- time - The amount of time to close them after opening, use 0 if you arent using autoclosing.
_________________________________________________
any more questions ask here.
Download
v0.1a - Out of date
http://mihd.net/3qn1ka
http://www.sendspace.com/file/ezdfjn
http://paike.pri.ee/FS/w_Gates.rar thanks to paike!
v0.1b
http://pastebin.com/f1f13e3af
http://www.sendspace.com/file/iaysju
http://www.turboupload.com/download/...En/w_Gates.inc
http://rapidshare.com/files/96561691/w_Gates.inc.html - Sorry about the rapidsux
Example filterscripts
http://pastebin.com/f7d04e0f0 ls gates
http://pastebin.com/f764521a8 sf gates
http://pastebin.com/fb77fdf2 lv gates
Enjoy.
WeeDarr