SA-MP Forums Archive
[FilterScript] [FS] [SAP]Sidhu's SFPD Gates - Dual - 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)
+--- Thread: [FilterScript] [FS] [SAP]Sidhu's SFPD Gates - Dual (/showthread.php?tid=29797)



[FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 12.03.2008

Hey hey... [SAP]Sidhu here, yet once again...

I've just made a SFPD gates filterscript, due to people always complaining because they don't know how to make a gates script.

Version 1

Contains: 2 gates, one in the front and one in the back, due to the dual entrance :P
And both gates open and close at the same time with the commands


Commands

- "/sfpdo" - Opens the gates
- "/sfpdc" - Closes the gates

Please do not remove the credits
DO NOT CLAIM THIS AS YOUR OWN!
DO NOT EDIT THIS!
DON'T TRY TO MAKE A COPY OF THIS!


Download Here: http://pastebin.com/f1a8e23f1

B.T.W: Mirrors are appreciated

_________________________________________________


Version 2


This is basically the first version, but this has extra gates, which don't move, but provide extra security

Contains: 2 gates, one in the front and one in the back (due to the dual entrance), both gates open and close at the same time with the commands ,
2 big gates at the back for extra security

Commands

- "/sfpdo" - Opens the gates
- "/sfpdc" - Closes the gates

Please do not remove the credits


Download Here: http://pastebin.com/f7ae7149e
OR Here: http://www.filefront.com/14836319/%5...PD%20Gates.zip

B.T.W: Mirrors are appreciated


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - whooper - 12.03.2008

it was his first gate script :\ SId i told u not to make the secondary gatwes on create object u only use 1


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 12.03.2008

No no.....

CreateObject(971, -1571.684082, 661.248901, 9.782433, 0.0000, 0.0000, 91.1003); // Gate 1 - Front (moving)
CreateObject(971, -1701.645386, 684.088989, 27.385559, 0.0000, 0.0000, 269.0036); // Gate 2 - Back (moving)
CreateObject(971, -1696.932495, 688.375793, 27.460558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
CreateObject(971, -1688.062378, 688.283691, 27.435558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)


Gate 1 and Gate 2 are the opening and closing gates.
The secondary gates are beside Gate 2, because there was a small opening where someone could drive their vehicle through(these dont move, they're there for extra security)

There are no extra gates


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - whooper - 12.03.2008

hm im only expirenced with adding things to gm but i dont think thats right


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 13.03.2008

Quote:
Originally Posted by whooper
hm im only expirenced with adding things to gm but i dont think thats right
Lol.... thats not the whole code


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - Sandra18[NL] - 13.03.2008

Did you test this filterscript?

I don't think so, because the object will not load!:

Код:
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
	CreateObject(971, -1571.684082, 661.248901, 9.782433, 0.0000, 0.0000, 91.1003); // Gate 1 - Front (moving)
	CreateObject(971, -1701.645386, 684.088989, 27.385559, 0.0000, 0.0000, 269.0036); // Gate 2 - Back (moving)
	CreateObject(971, -1696.932495, 688.375793, 27.460558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
	CreateObject(971, -1688.062378, 688.283691, 27.435558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
	return 1;
}
So OnFilterScriptInit will only get called when 'FILTERSCRIPT' is defined.
But did not defined FILTERSCRIPT. (Its commented).



Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 13.03.2008

Yes... I just tried it again, and it does not work.... Can someone please tell me how to fix this little problem?


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - Sandra18[NL] - 14.03.2008

The answer is written in that filterscript:

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT



Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 14.03.2008

Quote:
Originally Posted by =>Sandra<=
The answer is written in that filterscript:

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
PROBLEM RESOLVED

Thank you Sandra


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - a!DaN)_)-) - 19.06.2010

when i try to do it this happens

Код:
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(1) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(13) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(15) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(17) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(19) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(21) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(23) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(25) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(27) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(29) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(31) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(33) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(35) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(37) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(39) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(41) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(43) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(45) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(47) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(49) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(51) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(53) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(55) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(57) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(59) : error 010: invalid function or declaration
C:\Users\jack\Desktop\gta-sa-samp\filterscripts\sfpdgates.pwn(61) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 07.07.2010

Shouldnt happen.. Just download the .pwn and .amx.


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - [SF]Bamdude37 - 07.07.2010

Sid, I think its happeneing because you used OnGameModeInit when you did
//#define FILTERSCRIPT

It is calling the game mode instead of a filterscript, here try this:

Код:
/*
Credits goes to:
[SAP]Sidhu, for his awesome idea and programming!
[SAP]Sidhu Made this
	DO NOT REMOVE THE STUFF ABOVE, ANY ATTEMP TO DO SO WILL RESULT IN YOU PAYING THE CONSEQUENCES IF CAUGHT
*/
//===============================Include Files==================================


#include <a_samp>
#define GREY 0xc8bebeAA
#define COLOR_GREY 0xc8bebeAA
#define COLOR_LIME 0x99FF00AA
#define COLOR_RED 0xAA3333AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GRAD1 0xB4B5B7AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#pragma tabsize 0
new gate;
new gate2;

public OnPlayerConnect(playerid)
{
	SendClientMessage(playerid, COLOR_YELLOW, "This script was made by [SAP]Sidhu!");
	SendClientMessage(playerid, COLOR_YELLOW, "To view the SFPD gate commands, type /sfpdcmds");
	return 1;
}

public OnFilterScriptInit()
{
	gate = CreateObject(971, -1571.684082, 661.248901, 9.782433, 0.0000, 0.0000, 91.1003); // Gate 1 (closed position)
	gate2 = CreateObject(971, -1701.645386, 684.088989, 27.385559, 0.0000, 0.0000, 269.0036); // Gate 2 (closed position)
	CreateObject(971, -1696.932495, 688.375793, 27.460558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
	CreateObject(971, -1688.062378, 688.283691, 27.435558, 0.0000, 0.0000, 179.6222); // Secondary gate (does not move)
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp(cmdtext, "/sfpdo", true)==0) // Command (changable)
        {
         MoveObject (gate,-1572.187622, 670.214355, 9.742842,2); // Gate 1 (open position)
         MoveObject (gate2,-1701.508301, 692.963318, 27.385559,2); // Gate 2 (open position)
         SendClientMessage(playerid, COLOR_RED, "SFPD GATES ARE OPEN!");
         return 1;
        }
	if (strcmp(cmdtext, "/sfpdc", true)==0)
       {
       MoveObject (gate,-1571.684082, 661.248901, 9.782433,2); // Gate 2 (close position)
       MoveObject (gate2,-1701.645386, 684.088989, 27.385559,2); // Gate 2 (close position)
       SendClientMessage(playerid, COLOR_GREEN, "SFPD GATES ARE CLOSED!");
       return 1;
       }
    if(!strcmp(cmdtext, "/sfpdcmds", true))
	{
    	SendClientMessage(playerid, COLOR_YELLOW, "/sfpdo - Opens the SFPD gates");
    	SendClientMessage(playerid, COLOR_YELLOW, "/sfpdc - Closes the SFPD gates");
    	return 1;
       }

	return 0;
}



Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - sidhu123 - 08.07.2010

Oh did I really? My mistake if I did, it was one of the first scripts I made..
Even if I did, thats really weird because it seems to work for me.
Anyways, thanks for fixing it!


Re: [FS] [SAP]Sidhu's SFPD Gates - Dual - [SF]Bamdude37 - 08.07.2010

No problem, and its cool, you should have seen the mistakes I made when I first started scripts