[FilterScript] [FS] [SAP]Sidhu's SFPD Gates - Dual
#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


Messages In This Thread

Forum Jump:


Users browsing this thread: 8 Guest(s)