Gateopen
#1

how to make the gate open by use move object only i need example
Reply
#2

Код:
#include <a_samp>
new Gate, bool:GateClosed = true;

public OnGameModeInit()
{
	Gate = CreateObject(512, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0); // 512 = Object ID...   0.0 areCOORDINATES
	SetTimer("GateCheck", 7000, true);
	return 1;
}

forward GateCheck();
public GateCheck()
{
	if(!IsObjectMoving(Gate)){
		for(new i; i<GetMaxPlayers(); i++){
			if(IsPlayerConnected(i && IsPlayerInRangeOfPoint(i, 15.0, 0.0, 0.0, 0.0)){  //COORDINATES
				if(GateClosed){
					GateClosed = false;
					MoveObject(Gate, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0); //COORDINATES
				}
				else{
					GateClosed = true;
					MoveObject(Gate, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0);  //CORDINATES
			}
			}
		}
	}
}
Reply
#3

try this

http://forum.sa-mp.com/showthread.ph...ght=gate+maker
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)