SA-MP Forums Archive
/takeguns. Don't work the PlayerToPoint - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /takeguns. Don't work the PlayerToPoint (/showthread.php?tid=163997)



/takeguns. Don't work the PlayerToPoint - benedek - 29.07.2010

Hello, I create a "/takeguns" command, but all player's can say takeguns, anywhere.Here is the Code:
CODE:
http://pastebin.com/bytt8gTu
CODE:

I set the if (PlayerToPoint(3.0, playerid,1267.663208,-781.323242,1091.906250)) into Hq Corleone. I don't know what is 3.0 in "if (PlayerToPoint(3.0,"

Thank's for help, and excuse my bad english


Re: /takeguns. Don't work the PlayerToPoint - GoldenM4 - 29.07.2010

PlayerToPoint??
Try

IsPlayerInRangeOfPoint()
then do else ur not at Hq or sumthin


Re: /takeguns. Don't work the PlayerToPoint - ikey07 - 29.07.2010

3.0 is a radiuss of that one point, because else you need to be exact in 1267.663208 which is inposibble to be there.

but yes use IsPlayerInRangeOfPoint



Re: /takeguns. Don't work the PlayerToPoint - benedek - 29.07.2010

hmm.. please use an example to IsPlayerInRangeOfPoint witch coordonats.

I rezolved the problem, see http://pastebin.com/UQMtZbhM

Now i have a new problem again witch coordonats an a command of atm:http://pastebin.com/4jFebSXG

Please give me an example to use IsPlayerInRangeOfPoint


Re: /takeguns. Don't work the PlayerToPoint - ikey07 - 29.07.2010

if (PlayerToPoint(3, playerid,1729.5905,-1864.4565,13.573 )

replace to

if (IsPlayerInRangeOfPoint(playerid,3.0,1729.5905,-1864.4565,13.573 )

IsPlayerInRangeOfPoint(playerid,Radiuss,x,y,z)