IsPlayerNearVehicle
#7

you can try my stock it never gave me problems
pawn Код:
stock CheckPlayerDistanceToVehicle(Float:radi, playerid, vehicleid)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:PX,Float:PY,Float:PZ,Float:X,Float:Y,Float:Z;
        GetPlayerPos(playerid,PX,PY,PZ);
        GetVehiclePos(vehicleid, X,Y,Z);
        new Float:Distance = (X-PX)*(X-PX)+(Y-PY)*(Y-PY)+(Z-PZ)*(Z-PZ);
        if(Distance <= radi*radi)
        {
            return true;
        }
    }
    return false;
}
Reply


Messages In This Thread
IsPlayerNearVehicle - by aircombat - 03.04.2011, 21:37
Re: IsPlayerNearVehicle - by Backwardsman97 - 03.04.2011, 22:42
Re: IsPlayerNearVehicle - by SchurmanCQC - 03.04.2011, 22:44
Re: IsPlayerNearVehicle - by aircombat - 04.04.2011, 03:02
Re: IsPlayerNearVehicle - by XFlawless - 04.04.2011, 03:08
Re: IsPlayerNearVehicle - by Donya - 04.04.2011, 03:20
Re: IsPlayerNearVehicle - by Hornet600 - 04.04.2011, 03:42

Forum Jump:


Users browsing this thread: 1 Guest(s)