SA-MP Forums

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 23/11/2009, 05:27 PM   #1
GaGlets(R)
Gangsta
 
GaGlets(R)'s Avatar
 
Join Date: Oct 2009
Posts: 791
Reputation: 5
Default Auto gates ;)

Hello all..

Im making my first map....


It will be autogates

My autogates wont work... I made that, if player is in any police car gate opens, if he is in right place gates open..

here is my script.... i know shame on me..

Code:
public autogates(playerid)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	GetPlayerVehicleID(playerid);
	
  if(isacar(vehicleid) == 1)
	{
		if(IsPlayerInRangeOfPoint(playerid, 25, 1544.7, -1628.0, 14.0))
		{
		MoveObject(lsdpprieksa, 1544.7757568359, -1636.0593261719, 14.057502746582, 3); //vala
		}
		else if(IsPlayerInRangeOfPoint(playerid, 26, 1544.7, -1628.0, 14.0))
		{
		MoveObject(lsdpprieksa, 1544.7757568359, -1628.0593261719, 14.057502746582, 3); //ciet
		}
		else if(IsPlayerInRangeOfPoint(playerid, 25, 1588.181640625, -1637.8323974609, 15.19012260437))
		{
  		MoveObject(lsdpgaraza, 1598.181640625, -1637.8323974609, 15.19012260437, 3); //vala
  		}
  		else if(IsPlayerInRangeOfPoint(playerid, 26, 1588.181640625, -1637.8323974609, 15.19012260437))
	  	{
  	MoveObject(lsdpgaraza, 1588.181640625, -1637.8323974609, 15.19012260437, 3); //ciet
  	}
  }
  else if(isacar(vehicleid) == 0)
  {
  	SendClientMessage(playerid, COLOR_5,"Error: You need to be in any police car!");
  }
  return 0;
}

The gates wont move i have dona all this with cmds and works perfect...
GaGlets(R) 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] t-Auto Gates Toad Includes 131 13/04/2014 09:01 AM
LVPD Gates v2 Now with Auto Gates!! SlashPT Filterscripts 37 16/03/2010 03:59 PM
auto gates need cssbart Help Archive 8 18/02/2010 01:45 PM
Auto Gates Danikov Help Archive 26 20/10/2009 03:31 PM
[HELP] t-Auto Gates joeri55 Help Archive 2 02/06/2009 08:50 AM


All times are GMT. The time now is 02:36 AM.


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