[INC]w_Gates | Police HQ gates made easy -
weedarr - 20.01.2008
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, Add
LSPDGate, Add
SFPDGate and Add
LVPDGate. 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;
}
Now on to opening and closing, using a command we can simply do this
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;
}
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
- 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.
Example filterscript -
http://pastebin.com/f2e4558f6
_________________________________________________
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
Re: [INC]w_Gates | Police HQ gates made easy -
luxeon - 20.01.2008
its good for newbies + good example on [HOWTO].
you can add distance btw
and TEAM_COP ,COPS etc...
Re: [INC]w_Gates | Police HQ gates made easy -
weedarr - 20.01.2008
lol oops i honestly never thought of that! next version ok?
WeeDarr
Re: [INC]w_Gates | Police HQ gates made easy -
MaTrIx4057 - 20.01.2008
You should add bunch of gates like for airports and all that xD
Re: [INC]w_Gates | Police HQ gates made easy -
luxeon - 20.01.2008
gl with that WeeDarr ,thats really good for example ! 10/10.
Re: [INC]w_Gates | Police HQ gates made easy -
weedarr - 20.01.2008
Quote:
Originally Posted by TheMaTrIx4057
You should add bunch of gates like for airports and all that xD
|
oh heres some more functions
stock CreateGate(gateid,modelid,Float:X,Float:Y,Float:Z, Float:rX,Float:rY,Float:rZ)
{
gateid = CreateObject(modelid,Float:X,Float:Y,Float:Z,Float :rX,Float:rY,Float:rZ);
}
stock MoveGate(gateid,Float:X,Float:Y,Float:Z,Float:Spee d)
{
MoveObject(gateid,Float:X,Float:Y,Float:Z,Float:Sp eed);
}
stock DestroyGate(gateid)
{
DestroyObject(gateid);
}
i made them first but then i made the others
WeeDarr
Re: [INC]w_Gates | Police HQ gates made easy -
paike - 20.01.2008
omg :S
1) link: too many connections
2) forbitten
maybe mirror anyone ?
Re: [INC]w_Gates | Police HQ gates made easy -
weedarr - 20.01.2008
i on psp, mirror = good, any1?
WeeDarr
Re: [INC]w_Gates | Police HQ gates made easy -
paike - 20.01.2008
link1 = Too many connections from your ip, take it easy! (nb, i have static ip and i dont share my net. i dont understand :S:S)
link2 = 403 - Forbidden
Re: [INC]w_Gates | Police HQ gates made easy -
Avatar - 21.01.2008
Reguestion new link