How to set moving gates
#1

Hello everyone,
a friend of me have make for me Gates on police department. but i dont know how to change it from place

in Los Santos u get a wall when the climb over the can enter the police garage so i want my gate before the inside of the garage, Can u help me please here u get the script code.

Код:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
	new Float:oldposx, Float:oldposy, Float:oldposz, 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;
}

public OpenPoliceDepartmentGate()
{  if(pdebug == 1){print("[DEBUG] OpenPoliceDepartmentGate()");}

  if(city == 1){MoveObject(GatePD, 1539.709717, -1627.873047, 8.057503, 2.0);}
	if(city == 2){MoveObject(GatePD, -1571.661133, 656.477478, 6.354377, 2.0);}
	return 1;
}
public ClosePoliceDepartmentGate()
{  if(pdebug == 1){print("[DEBUG] ClosePoliceDepartmentGate()");}

  if(city == 1){MoveObject(GatePD, 1539.709717, -1627.873047, 14.057503, 2.0);}
	if(city == 2){MoveObject(GatePD, -1571.661133, 665.627869, 6.354377, 2.0);}
	return 1;
}
Reply
#2

https://sampwiki.blast.hk/wiki/Automatic_Gates
Reply
#3

Lol. i dont understand that shit :S
Reply
#4

LOL. This is not a shit, this is a usefull code, how to make automatic gate!
Reply
#5

Quote:
Originally Posted by yugokoral
LOL. This is not a shit, this is a usefull code, how to make automatic gate!
yugo = yugoslavia xD sta ima

Quote:
Originally Posted by Mkb122
Lol. i dont understand that shit :S
Read few times,you'll understand it.
Reply
#6

Quote:

yugo = yugoslavia xD sta ima

Yugoslavia is AWESOME... not just because of the communism but because of the great name :P

And you will get it after some time! get a book on C++! that helped me understand Pawn code better
Reply
#7

Lol thanx now i have it in my server, but can i set that i the not only can open theg ate when whe are cop skins but with rank i have real life mod and there whe can set /setrank ID rank 1 or 2 1 is cop 2 is army
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)