Problem 3
#1

Hello I have thiis script :

Код:
/*
                        (@ @)
            +-------------oOO-------(_)------OOo-------------+
            |                        |
            |       = GATE LSPD CLAXON =        |
            |      |- For Mod GodFather -|       |
            |  		# **** By PuNaNi **** #      |
            |                        |
            |    		                 |
            |                        |
            | @@ Nu Iuta , respecta si veti fi respectat @@ |
            |                        |
            |      No Change The CREDITS			   |
            |                        |
            |   ©          	    © 	 |
            +------------------------------------------------+

*/
//------------<[ InCludes ]>-----------------------
#include <a_samp>
//------------<[ Defines ]>-----------------------
#define MAX_COPCAR 10
#define FILTERSCRIPT
//------------<[ ForWards ]>-----------------------
forward closelsdgate();
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
forward IsACopCar(carid);
//------------<[ News ]>-----------------------
new bariera;
new lspdgate;
//------------<[ strocks ]>-----------------------
stock IsPlayerInCopCar(playerid)// Portile de polite se deschid numai la masiniile de politie
{
#define MAX_COPCAR 10
new CopCar[] ={601,432,599,597,598,596,528,490,427,523};
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid,vehicleid))
{
for(new i = 0; i < sizeof(CopCar); i++)
{
if(GetVehicleModel(vehicleid) == CopCar[i])
{
return true;
}
}
}
return false;
}
//------------------------------------------------------------------------------------------------
public OnFilterScriptInit()
{
CreateObject(1495, 1584.123047, -1638.037231, 12.367689, 0.0000, 0.0000, 180.0000);
bariera = CreateObject(968, 1544.674683, -1630.826538, 12.992054, 0.0000, 269.7592, 269.7592);
lspdgate = CreateObject(971, 1588.84, -1637.89, 13.18, 0.00, 0.00, 0.10);
CreateObject(983, 1544.693726, -1620.809692, 13.213117, 0.0000, 0.0000, 0.0000);
CreateObject(983, 1545.453125, -1635.881714, 13.237875, 0.0000, 0.0000, 11.2500);
//----------------------------------------------------------------------------------------------------
print("\n--------------------------------------------");
print("Gate LSPD -= FS -= By PuNaNi @ LoadeD-UPDATED ");//No Change The CREDITS
print("---------------------------------------------\n");
return 1;
}
//----------------------------------------------------------------------------------------------------
public OnFilterScriptExit()
{
print("\n----------------------------------------------");
print(" GaTe LSPD -= FS -= By PuNaNi @ UnLoaded-UPDATED");// No Change The CREDITS
print("----------------------------------------------\n");
return 1;
}
//------------<[ OnPlayerKeyStateChange ]>-----------------------
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((newkeys==KEY_CROUCH )&&(IsPlayerInCopCar(playerid))&&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
{
if (PlayerToPoint(15, playerid,1541.8696,-1628.0836,13.3828))
{
SetObjectRot(bariera, 0, 0, 270);
SetTimer("closelsdgate",2000,0);
}
}
if (PlayerToPoint(15, playerid,1588.1678,-1633.8999,13.3828) || PlayerToPoint(15, playerid,1589.0842,-1641.1907,13.0884))
{
MoveObject(lspdgate,1588.84, -1637.89, 7.18,2);
SetTimer("closelsdgate",2000,0);
}
return 0;
}
//------------<[ Closelsdgate ]>-----------------------
public closelsdgate()
{
SetObjectRot(bariera, 0, 270, 270);
MoveObject(lspdgate,1588.84, -1637.89, 13.18,2);
return 1;
}
//------------<[ PlyaerToPoint ]>-----------------------
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
I want to stay only barrier, not the gate, I want to delete stuff with lspdgate etc. I want to stay only barrier xD
Reply
#2

http://pastebin.com/m141359d7

Try
Reply
#3

I changed my mind you have to stick to GM over there?
Reply
#4

Huh?
Reply
#5

Rezolved
Closed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)