[FilterScript] [FS] [SAP]Sidhu's SFPD Gates - Dual
#1

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
Reply
#2

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

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
Reply
#4

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

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
Reply
#6

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).
Reply
#7

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

The answer is written in that filterscript:

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

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
Reply
#10

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.
Reply
#11

Shouldnt happen.. Just download the .pwn and .amx.
Reply
#12

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;
}
Reply
#13

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!
Reply
#14

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


Forum Jump:


Users browsing this thread: 1 Guest(s)