SA-MP Forums Archive
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: PlayerToPoint (/showthread.php?tid=162832)



PlayerToPoint [Noob question] - [DK]JaloNik - 24.07.2010

Waddup Dawgs!

Okay, here's what I want.
As I made this boat dealership today, I want to make sure that people won't be able to park their boat the place where the boat spawns when you buy it. So I tried to add this to my /v park commando:
pawn Код:
if(!PlayerToPoint(40.0, playerid,-2234.5803,2468.9119,5.7422))
                {
                return SendClientMessage(playerid,COLOR_RED,"[WARNING]: You cannot park your vehicle here!");
                }
After what I understand about PlayerToPoint, this should make sure, that the is to the point, and if yes, only send the SendClientMessage, and not park the vehicle there. :P
But it doesn't. It doesn't even show the text when you park the vehicle there.
Anyone know how to do this?
Btw my forward:
pawn Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
Thanks in advance!

JaloNik =)


Re: PlayerToPoint - selten98 - 24.07.2010

pawn Код:
if(IsPlayerInRangeOfPoint(playerid,40.0,-2234.5803,2468.9119,5.7422)) return SendClientMessage(playerid,COLOR_RED,"[WARNING]: You cannot park your vehicle here!");
i would do it like this...


Re: PlayerToPoint - [DK]JaloNik - 24.07.2010

Quote:
Originally Posted by selten98
Посмотреть сообщение
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,40.0,-2234.5803,2468.9119,5.7422)) return SendClientMessage(playerid,COLOR_RED,"[WARNING]: You cannot park your vehicle here!");
i would do it like this...
This does create the text, but dosen't returns to 0, and still parks the vehicle? :S


Re: PlayerToPoint - WillyP - 24.07.2010

make a fence? xD or
maybe a samsite


Re: PlayerToPoint - Nero_3D - 24.07.2010

Quote:
Originally Posted by [DK]JaloNik
Посмотреть сообщение
This does create the text, but dosen't returns to 0, and still parks the vehicle? :S
Its the same as your code only that his code does it correclty

And I think that the radius is to big it has a diameter of 80.0 GTA-SA length units


Re: PlayerToPoint - [DK]JaloNik - 24.07.2010

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
Its the same as your code only that his code does it correclty

And I think that the radius is to big it has a diameter of 80.0 GTA-SA length units
Yeah it's too big. :P I know. And I know that was the same code lulz.

@Lolrolf, you're might right.. :P Imma make some roof or smth lulz.