SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 21/12/2009, 09:57 AM   #1
eXtr1kE
Big Clucker
 
Join Date: Dec 2009
Posts: 114
Reputation: 0
Default Problem 3

Hello I have thiis script :

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

*/
//------------<[ 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
__________________
Contact : extrike@equilibrum.ro (ONLINE OF MSN)
eXtr1kE is offline  
Old 21/12/2009, 11:31 AM   #2
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: Problem 3

http://pastebin.com/m141359d7

Try
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
Old 21/12/2009, 01:04 PM   #3
eXtr1kE
Big Clucker
 
Join Date: Dec 2009
Posts: 114
Reputation: 0
Default Re: Problem 3

I changed my mind you have to stick to GM over there?
__________________
Contact : extrike@equilibrum.ro (ONLINE OF MSN)
eXtr1kE is offline  
Old 21/12/2009, 01:08 PM   #4
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: Problem 3

Huh?
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
Old 21/12/2009, 02:24 PM   #5
eXtr1kE
Big Clucker
 
Join Date: Dec 2009
Posts: 114
Reputation: 0
Default Re: Problem 3

Rezolved
Closed
__________________
Contact : extrike@equilibrum.ro (ONLINE OF MSN)
eXtr1kE is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.