SA-MP Forums Archive
How to check.... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to check.... (/showthread.php?tid=368298)



How to check.... - TaLhA XIV - 12.08.2012

Hello,
Just wanted to ask that how to check if player is near a vehicle.
ThAnKs!


Re: How to check.... - Kindred - 12.08.2012

IsPlayerInRangeOfPoint?

GetVehiclePos?

Etcetra?


Re: How to check.... - FalconX - 12.08.2012

Quote:
Originally Posted by TaLhA XIV
Посмотреть сообщение
Hello,
Just wanted to ask that how to check if player is near a vehicle.
ThAnKs!
pawn Код:
stock IsPlayerNearVehicle(playerid,vehicleid)
{
    new Float:VX,Float:VY,Float:VZ;
    GetVehiclePos(vehicleid,VX,VY,VZ);
    if(IsPlayerInRangeOfPoint(playerid,5.0,VX,VY,VZ)) return 1;
    else return 0;
}
hope this helps ?


Re: How to check.... - Emmet_ - 12.08.2012

Nevermind...