MOVE object problem...
#6

If you don't understand my way, I'd recommend what Rafa put since he's gone and done it all for you:
Quote:
pawn Код:
#include <a_samp>

new Firasgate;

public OnFilterScriptInit()
{
    Firasgate = CreateObject(4101, 3006.2673339844, -1934.9904785156, -88.822967529297, 0, 0, 93.9990234375); // change the coords what ever u want ... :)
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/opengate1", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 200.0, 3006.2673339844, -1934.9904785156, -88.822967529297)) // this is the range of point on player
        {
            MoveObject(Firasgate, 3006.2673339844, -1934.9904785156, -88.822967529297, 2.0); // u can change the coords of the object...
            SendClientMessage(playerid, 0xFF8000FF, "You has open the gate."); // message to player who open/close gate
            }else{
            SendClientMessage(playerid, 0xFF0000FF, "You are not near the gate."); // he is not near the gate
        }
        return 1;
    }
    if(strcmp("/closegate1", cmdtext, true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid, 100.0, 2966.7800292969, -1913.8002929688, 17.379014968872))// u can change it the coords what ever u want...
        {
            MoveObject(Firasgate, 2966.7800292969, -1913.8002929688, 17.379014968872, 5.0); // change the coords and that ( 5.0 ) is the speed of the object...
            SendClientMessage(playerid, 0xFF8000FF, "You has close the gate."); // message
            }else{
            SendClientMessage(playerid, 0xFF0000FF, "You are not near the gate."); // he is not near the gate
        }
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
MOVE object problem... - by knackworst - 23.10.2010, 21:19
Re: MOVE object problem... - by Mike_Peterson - 23.10.2010, 21:25
Re: MOVE object problem... - by Badger(new) - 23.10.2010, 21:39
Re: MOVE object problem... - by Rafa - 23.10.2010, 21:39
Re: MOVE object problem... - by knackworst - 23.10.2010, 22:30
Re: MOVE object problem... - by Badger(new) - 23.10.2010, 22:41
Re: MOVE object problem... - by knackworst - 23.10.2010, 22:43
Re: MOVE object problem... - by Badger(new) - 23.10.2010, 22:45
Re: MOVE object problem... - by knackworst - 24.10.2010, 10:43
Re: MOVE object problem... - by Rafa - 24.10.2010, 11:00

Forum Jump:


Users browsing this thread: 1 Guest(s)