[Add-On] Police Gates (GF) -
Tez2k7 - 31.08.2008
Police Gates (GF)
This small and simple add-on for the godfather script basically makes gates at evey Police Station in San Andreas. You may use the auto-shut option which shuts the gates 5 seconds after the /open command.
Link to the Godfather Script:
Click Here.
I've use the function: IsACop(playerid) to check if the player is a cop, and if they aren't then the gate won't open. This add-on places both barriers and gates at LSPD, SFPD, and LVPD.
~Commands~ (Won't need to /close if using the auto-shut script)
/lspdbarriergate1open /lspdbarriergate1close
/lspdgate1open /lspdgate1close
/sfpdbarriergate1open /sfpdbarriergate1close
/sfpdbarriergate2open /sfpdbarriergate2close
/sfpdgate1open /sfpdgate1close
/lvpdbarriergate1open /lvpdbarriergate1close
/lvpdgate1open /lvpdgate1close
/lvpdgate2open /lvpdgate2close
~Links~
Pastebin(Normal)
Pastebin(With auto-shut after 5seconds.)
Updated
~Credits~
Made By Tez
Don't really want much credit as it's pritty easy to do. It was aimed at the noobs who no nothing about Pawn who start off with the godfather.
~Future Releases~
If any bugs are found or if you have any suggestions then please say so here.
Thanks, Tez
TUTORIAL
Quote:
Originally Posted by [XG
Tez ]
I've had a few requests on how to add the damn thing into the gf. It's pritty simple. I'll try tell you how and keep it short at the same time.
Now, at the top of the script, where all you 'new' things are, add the following.
pawn Code:
new LSPDBarrier1; new LSPDGate1; new SFPDBarrier1; new SFPDBarrier2; new SFPDGate1; new LVPDBarrier1; new LVPDGate1; new LVPDGate2;
Now, under your 'OnGameModeInit' add the following:
pawn Code:
CreateObject(995,1544.841674,-1633.573242,13.244799,90.000000,0.000000,271.012207); // LSPDBlock1 CreateObject(994,1544.860107,-1617.647216,12.537019,-1.000000,0.000000,269.168762); // LSPDBlock2 CreateObject(971,-1636.529296,688.580444,9.389122,0.000000,0.000000,358.653167); // SFPDBlock1 LSPDBarrier1 = CreateObject(968,1544.755004,-1623.929199,13.352820,0.000000,89.000000,269.818847); LSPDGate1 = CreateObject(980,1588.265991,-1638.143554,15.014236,0.000000,0.000000,0.675605); SFPDBarrier1 = CreateObject(968,-1572.275878,665.800231,7.037499,0.000000,-89.000000,91.176780); SFPDBarrier2 = CreateObject(968,-1701.454101,680.673767,24.857488,0.000000,-89.000000,269.939086); SFPDGate1 = CreateObject(971,-1627.696777,688.464660,9.414549,0.000000,0.000000,-0.333460); LVPDBarrier1 = CreateObject(968,2238.143554,2457.357910,10.833136,0.000000,89.000000,271.965820); LVPDGate1 = CreateObject(980,2293.974853,2497.135498,4.561177,0.000000,0.000000,91.243118); LVPDGate2 = CreateObject(980,2335.075195,2443.761474,7.144308,0.000000,0.000000,241.384170);
Now all we need are the commands. Under your 'OnPlayerCommandText' add the following:
pawn Code:
if(strcmp(cmd, "/LSPDBarrier1open", true) == 0) // Command { if(IsACop(playerid)) // Checks if the player is in the police { SetObjectRot(LSPDBarrier1,0.000000,0.000000,269.818847); // Moves the object } } if(strcmp(cmd, "/LSPDBarrier1close", true) == 0) { if(IsACop(playerid)) { SetObjectRot(LSPDBarrier1,0.000000,89.000000,269.818847); } } if(strcmp(cmd, "/LSPDGate1open", true) == 0) { if(IsACop(playerid)) { MoveObject(LSPDGate1, 1588.265991,-1638.143554,9.534472,0.4); } } if(strcmp(cmd, "/LSPDGate1close", true) == 0) { if(IsACop(playerid)) { MoveObject(LSPDGate1, 1588.265991,-1638.143554,15.014236,0.4); } } if(strcmp(cmd, "/SFPDBarrier1open", true) == 0) { if(IsACop(playerid)) { SetObjectRot(SFPDBarrier1,0.000000,-1.000000,91.176780); } } if(strcmp(cmd, "/SFPDBarrier1close", true) == 0) { if(IsACop(playerid)) { SetObjectRot(SFPDBarrier1,0.000000,-89.000000,91.176780); } } if(strcmp(cmd, "/SFPDBarrier2open", true) == 0) { if(IsACop(playerid)) { SetObjectRot(SFPDBarrier2,0.000000,-1.000000,269.939086); } } if(strcmp(cmd, "/SFPDBarrier2close", true) == 0) { if(IsACop(playerid)) { SetObjectRot(SFPDBarrier2,0.000000,-89.000000,269.939086); } } if(strcmp(cmd, "/SFPDGate1open", true) == 0) { if(IsACop(playerid)) { MoveObject(SFPDGate1, -1627.696777,688.464660,14.599885,0.4); } } if(strcmp(cmd, "/SFPDGate1close", true) == 0) { if(IsACop(playerid)) { MoveObject(SFPDGate1, -1627.696777,688.464660,9.414549,0.4); } } if(strcmp(cmd, "/LVPDBarrier1open", true) == 0) { if(IsACop(playerid)) { SetObjectRot(LVPDBarrier1, 0.000000,-1.000000,271.965820); } } if(strcmp(cmd, "/LVPDBarrier1close", true) == 0) { if(IsACop(playerid)) { SetObjectRot(LVPDBarrier1, 0.000000,89.000000,271.965820); } } if(strcmp(cmd, "/LVPDGate1open", true) == 0) { if(IsACop(playerid)) { MoveObject(LVPDGate1, 2293.974853,2497.135498,10.055157,0.4); } } if(strcmp(cmd, "/LVPDGate1close", true) == 0) { if(IsACop(playerid)) { MoveObject(LVPDGate1, 2293.974853,2497.135498,4.561177,0.4); } } if(strcmp(cmd, "/LVPDGate2open", true) == 0) { if(IsACop(playerid)) { MoveObject(LVPDGate2, 2335.075439,2443.761474,12.621609,0.4); } } if(strcmp(cmd, "/LVPDGate2close", true) == 0) { if(IsACop(playerid)) { MoveObject(LVPDGate2, 2335.075195,2443.761474,7.144308,0.4); } }
If you still can't do it then add my msn: removed
|
--
LSPD Gate open
http://www.jmorris4.pwp.blueyonder.c...pdopengate.jpg
LSPD Gate closed
http://www.jmorris4.pwp.blueyonder.c...dclosegate.jpg
LSPD Barrier open
http://www.jmorris4.pwp.blueyonder.c...AMP/BGopen.jpg
LSPD Barrier closed
http://www.jmorris4.pwp.blueyonder.c...MP/BGclose.jpg
Thanks to veteranmoza for the screenz.
--
Re: [Add-On] Police Gates (GF) -
northarmy - 01.09.2008
tutorial on how to install please.
Im new..
Re: [Add-On] Police Gates (GF) -
brett7 - 01.09.2008
go to the pastebin link and compile the script then save it to the filterscripts folder and add the name of the saved file to server.cfg under filtersrcipts like this
Code:
echo Executing Server Config...
lanmode 1
rcon_password password
maxplayers 32
port 7777
hostname Server
gamemode0 LVDM
filterscripts Police_gates
announce 1
query 1
weburl www.sa-mp.com
anticheat 0
Re: [Add-On] Police Gates (GF) -
Tez2k7 - 01.09.2008
Quote:
Originally Posted by brett7
go to the pastebin link and compile the script then save it to the filterscripts folder and add the name of the saved file to server.cfg under filtersrcipts like this
Code:
echo Executing Server Config...
lanmode 1
rcon_password password
maxplayers 32
port 7777
hostname Server
gamemode0 LVDM
filterscripts Police_gates
announce 1
query 1
weburl www.sa-mp.com
anticheat 0
|
If it was a filterscript yes, but this is a simple add on for the gf script. Look at the pastebin link for info on where put the commands and objects.
Re: [Add-On] Police Gates (GF) -
northarmy - 01.09.2008
Now i get an error...
Here is my script please fix it.
I Already added the commands etc.... Ctrl+f find them
Just fix it up please =]
LInk
http://rapidshare.com/files/141691697/gf.pwn.html
Re: [Add-On] Police Gates (GF) -
Tez2k7 - 01.09.2008
Post what your errors are and what lines they're on.
Re: [Add-On] Police Gates (GF) -
splitx - 01.09.2008
For next version you can make so the gate closes after like 5 sec? its better
if you dont know how to do it look in my sign afet my gates
Gr8 Work!!!
Re: [Add-On] Police Gates (GF) -
Tez2k7 - 01.09.2008
Quote:
Originally Posted by Splitx
For next version you can make so the gate closes after like 5 sec? its better if you dont know how to do it look in my sign afet my gates
Gr8 Work!!!
|
I'll start working on it
Re: [Add-On] Police Gates (GF) -
northarmy - 01.09.2008
if gives me some send.. dont send error.
Re: [Add-On] Police Gates (GF) -
Landon - 01.09.2008
No screens?
Re: [Add-On] Police Gates (GF) -
tomnidi - 01.09.2008
There are alot of errors, please fix it, I really need LVPD gates, the other gates I dont need
Re: [Add-On] Police Gates (GF) -
Tez2k7 - 01.09.2008
There are no errors if you know what to do. It's for the GF so if your planning on using it for something other then you have no chance unless you know how to script. There are
no errors.
Re: [Add-On] Police Gates (GF) -
kevinwalter - 10.09.2008
hi.....
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(11) : warning 235: public function lacks forward declaration (symbol "OnGameModeInit")
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(13) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(14) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(15) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(16) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(17) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(1
: error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(19) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(20) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(21) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(22) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(23) : error 017: undefined symbol "CreateObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(26) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(2
: error 017: undefined symbol "strcmp"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(30) : error 017: undefined symbol "IsACop"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(32) : error 017: undefined symbol "SetObjectRot"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(35) : error 017: undefined symbol "strcmp"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(37) : error 017: undefined symbol "IsACop"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(39) : error 017: undefined symbol "SetObjectRot"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(42) : error 017: undefined symbol "strcmp"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(44) : error 017: undefined symbol "IsACop"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(46) : error 017: undefined symbol "MoveObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(49) : error 017: undefined symbol "strcmp"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(51) : error 017: undefined symbol "IsACop"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(53) : error 017: undefined symbol "MoveObject"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(56) : error 017: undefined symbol "strcmp"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(5
: error 017: undefined symbol "IsACop"
C:\Documents and Settings\Kevin\Mijn documenten\gamemodes\gates.pwn(60) : error 017: undefined symbol "SetObjectRot"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
no no errors -_- WRONG
...
Re: [Add-On] Police Gates (GF) -
veteranmoza - 26.09.2008
You alright mate I dont wanna add to the pile of, and i quote, "noobs", but im having a bit of trouble.
Im not unfamiliar with scripting as such but I cant seem to compile after adding the script for the gates.
After visiting the link to pastebin I applied the code in the following places as seen (and unsure to my understanding wether they actually go here or not).
_________________________________________________
At the bottom of the script where the 'new' function ends i added.
Part 1
http://www.jmorris4.pwp.blueyonder.co.uk/position1.jpg
_________________________________________________
After this I proceeded to insert this part of the script underneath (but not directly)
public OnGameModeInit()
Part 2
http://www.jmorris4.pwp.blueyonder.co.uk/position2.jpg
_________________________________________________
Lastly I inserted the copied piece of code underneath (and once again not directly)
public OnPlayerCommandText(playerid, cmdtext[])
Part 3
http://www.jmorris4.pwp.blueyonder.co.uk/position3.jpg
_________________________________________________
After my attempt to compile the script i recieve the following error.
Error
http://www.jmorris4.pwp.blueyonder.co.uk/error1.jpg
_________________________________________________
I am aware that i am a complete "noob" but ive only been doing this for 2 days now. Any feedback and help will be
HIGHLY appreciated.
Thanks for your time mate. I hope this is all the information you need.
P.s.
If you need to contact me by the means of MSN, PM me for my addy.
Once again, Thanks.
EDIT1: As you can see on position 3 where i added the close callback symbol i removed it and i compiled it with success! im going to test it now!
EDIT2: GREAT ADDON IT WORKS GREAT THANK YOU TEZ!! EXCELLENT WORK!
veteranMOZA
Re: [Add-On] Police Gates (GF) -
Royals - 26.09.2008
Screen shots would be nice.
Re: [Add-On] Police Gates (GF) -
veteranmoza - 26.09.2008
Here are a few screenshots of the LSPD barrier and underground carpark gate open and closed.
LSPD Gate open
http://www.jmorris4.pwp.blueyonder.c...pdopengate.jpg
LSPD Gate closed
http://www.jmorris4.pwp.blueyonder.c...dclosegate.jpg
LSPD Barrier open
http://www.jmorris4.pwp.blueyonder.c...AMP/BGopen.jpg
LSPD Barrier closed
http://www.jmorris4.pwp.blueyonder.c...MP/BGclose.jpg
I havent yet got screenshots of the other gates/barriers but if you request them i suppose i could upload then for ya.
Whoops! just realised where i pasted the screenies into paint i must of moved the mouse and you can see part of the other screenies behind
my bad.
Anyway i hope this is satisfying enough for you.
Re: [Add-On] Police Gates (GF) -
Royals - 26.09.2008
Looks Great.
Re: [Add-On] Police Gates (GF) -
Thearenor - 08.10.2008
Can you pls tell me how i put it into the script ? xD
I dont know how to addon it ... xD
Re: [Add-On] Police Gates (GF) -
howardthk - 09.10.2008
Can you tell us how can add to GF?
Re: [Add-On] Police Gates (GF) -
MenaceX^ - 09.10.2008
Look nice, But why so much commands?
Just do it /pdgate =DDDD