Need help
#8

Quote:
Originally Posted by Dark Killer
Посмотреть сообщение

You might find this interesting too
Try like this
This will move your object to the x,y,z provided by you when a player is near to your object

Код:
new gate;
new bool:gateclosed;
forward GateCheck();
public OnGameModeInit()
{
SetTimer("GateCheck", 1000, true);
gate = CreateObject(975, 2334.5637,2443.9558,5.6758, 2333.1999511719, 2440.3000488281, 4.8000001907349);
}
Here you are naming you moving object as gate or you can say that you are assigning your object to the var "Gate"
Next step is you "GateCheck" ^^
Код:
public GateCheck()
{
            for(new i; i < MAX_PLAYERS; i++) // Start the loop
            {
                    if(IsPlayerInRangeOfPoint(i, 10.02334.5637,2443.9558,5.6758)) 
                    {
                    if(gateclosed = true)
                    {
                    MoveObject(gate, x,y,z, 3); // Here put  your x,y,z of your moved object 
                    gateclosed = false;
                    }
                        return; //This closes the callback
                    }
            }
           if(gateclosed == true) //If the gate IS open, but there's no one near..
            {
                    MoveObject(gate, -1985.65, 885.33, 44.13, 7); /
                    gateclosed = true; //This indicates the gate is closed again. Or at least, closing.
            }
    }
Here in "Moveobject" put your moved gate x,y,z
thanks
Reply


Messages In This Thread
Need help - by sscarface - 06.01.2013, 10:10
Re: Need help - by Steve Habbz - 06.01.2013, 10:15
Re: Need help - by sscarface - 06.01.2013, 10:24
Re: Need help - by mineralo - 06.01.2013, 10:31
Re: Need help - by Dark Killer - 06.01.2013, 10:40
Re: Need help - by eesh - 06.01.2013, 11:23
Re: Need help - by sscarface - 06.01.2013, 11:35
Re: Need help - by sscarface - 06.01.2013, 12:21

Forum Jump:


Users browsing this thread: 5 Guest(s)