Move problem help
#1

how do i make it so the object moves when player is in point

pawn Код:
CreateDynamicObject(18450, 1653.9000244141, -3886.1000976563, -5.9000000953674, 0, 0, 339.2138671875);//Closed
CreateDynamicObject(18450, 1653.9000244141, -3886.1000976563, 9, 0, 0, 339.2138671875);//Open
i want it so it works off both Sides of player inpoint

pawn Код:
AddPlayerClass(201,1612.9235,-3870.7036,10.3205,249.1435,0,0,0,0,0,0); // LS pORT SIDE // 1ST SIDE TO WORK OFF
AddPlayerClass(201,1696.7499,-3902.6533,10.3205,73.0088,0,0,0,0,0,0); // islamabad side// OTHER SIDE

pawn Код:
#include <a_samp>
#include <streamer>
#include <foreach>
#define red 0xFF0000AA
#define Message_color 0xFF0000AA
new bus;
forward Tolls(playerid);
forward Close();
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("bus barriier");
    print("--------------------------------------\n");
    bus = CreateDynamicObject(18450, 1653.9000244141, -3886.1000976563, -5.9000000953674, 0, 0, 339.2138671875);
//-------------------------------------Objects--------------------------------------------------//
   
//------------------------------------------------------------------------------------------------//
    return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerConnect( playerid )
{
SetTimerEx("Tolls", 1500, true, "d", playerid);
return 1;
}
public Tolls(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 1653.9000244141, -3886.1000976563, -5.9000000953674))
    {
       
           MoveDynamicObject(bus, 1653.9000244141, -3886.1000976563, 9, 2.5);
            SetTimerEx("Close",7000,false,"i", 0);
            }


        }


public Close()
{
    MoveDynamicObject(bus, 1653.9000244141, -3886.1000976563, -5.9000000953674, 3.5);
    return 1;
}
Reply


Messages In This Thread
Move problem help - by [LHT]Bally - 10.05.2012, 18:45
Re: Move problem help - by ViniBorn - 10.05.2012, 18:53
Re: Move problem help - by [LHT]Bally - 10.05.2012, 19:00
Re: Move problem help - by [LHT]Bally - 10.05.2012, 19:27
Re: Move problem help - by [LHT]Bally - 10.05.2012, 21:25
Re: Move problem help - by CrazyGab - 10.05.2012, 22:13
Re: Move problem help - by [LHT]Bally - 11.05.2012, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)