SA-MP Forums Archive
Vehicle radius from player - 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: Vehicle radius from player (/showthread.php?tid=284503)



Vehicle radius from player - Arcanize - 19.09.2011

Hey!

I want to put radius or something between vehicle and player.

Код:
if(IsPlayerInRangeOfPoint(i, 30.0, X, Y, Z))
When I use this, my GM says it's wrong. (Distance or something).

Q: How can I calculate radius from vehicle to player?
I want to do one system with music and I need radius. (Where player can hear it)


Re: Vehicle radius from player - [MG]Dimi - 19.09.2011

PHP код:
new Pos[3];
GetVehiclePos(vehicleid,Pos[0],Pos[1],Pos[2]);
if(
IsPlayerInRangeOfPoint(playerid,30.0,Pos[0],Pos[1],Pos[2]))
{
your code here




Re: Vehicle radius from player - =WoR=Varth - 19.09.2011

GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z);


Re: Vehicle radius from player - Arcanize - 19.09.2011

Nope..


Re: Vehicle radius from player - =WoR=Varth - 19.09.2011

Quote:
Originally Posted by Arcanize
Посмотреть сообщение
Nope..
Nope what?


Re: Vehicle radius from player - Arcanize - 19.09.2011

yea, it now works, thanks dudes