Help IsPlayerInRangeOffThePoint
#8

This is what you want:
pawn Код:
forward AreaChecker(playerid);

new Pveh[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    SetTimer("AreaChecker", 200, 1);
    return 1;
}

public AreaChecker()
{
    new Float: X, Float:Y, Float:Z, Float:Velocity[3];
    GetPlayerPos(playerid, X, Y, Z);
    for(new i=0; i<MAX_PLAYERS; i++)
       {
              if(IsPlayerConnected(i))
              {
            if (X > xmin && Y > ymin && X < xmax && Y < ymax)
            {
                if (IsPlayerInAnyVehicle(playerid))
                {
                Pveh = GetPlayerVehicleID(playerid);
                GetVehicleVelocity(Pveh, Velocity[0], Velocity[1], Velocity[2]);
                SetVehicleVelocity(Pveh, -Velocity[0], -Velocity[1], Velocity[2]);
                }
            }
        }
    }
    return 1;
}
BUT if the player goes with small speed, he won't be launched. I wil work some more on it and perhaps make it perfect in some minutes
Reply


Messages In This Thread
Help IsPlayerInRangeOffThePoint - by kalanerik99 - 17.04.2013, 14:13
Re: Help IsPlayerInRangeOffThePoint - by Sithis - 17.04.2013, 14:32
Re: Help IsPlayerInRangeOffThePoint - by Jack_Ryder - 17.04.2013, 14:32
Re: Help IsPlayerInRangeOffThePoint - by TomatoRage - 17.04.2013, 14:33
Re: Help IsPlayerInRangeOffThePoint - by BlackID - 17.04.2013, 14:48
Re: Help IsPlayerInRangeOffThePoint - by kalanerik99 - 17.04.2013, 17:05
Re: Help IsPlayerInRangeOffThePoint - by TomatoRage - 17.04.2013, 17:29
Re: Help IsPlayerInRangeOffThePoint - by HurtLocker - 17.04.2013, 17:48
Re: Help IsPlayerInRangeOffThePoint - by kalanerik99 - 17.04.2013, 18:02
Re: Help IsPlayerInRangeOffThePoint - by HurtLocker - 17.04.2013, 18:04

Forum Jump:


Users browsing this thread: 3 Guest(s)