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=67487)
PlayerToPoint -
Born2die - 01.03.2009
Hi,
I've made something like this:
pawn Код:
if(!strcmp("/Enter", cmdtext, true) && PlayerToPoint(1.5 ,playerid, Float: -691.5717,Float: 939.6139,Float: 13.6328))
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid,Float: -2158.72 ,Float: 641.29 ,Float: 1052.38);
return 1;
}
That should go under OnPlayerCommandText, but I made a small change and deleted (!strcmp("/Enter", cmdtext, true)
pawn Код:
if(PlayerToPoint(1.5 ,playerid, Float: -691.5717,Float: 939.6139,Float: 13.6328))
{
SetPlayerInterior(playerid, 1);
SetPlayerPos(playerid,Float: -2158.72 ,Float: 641.29 ,Float: 1052.38);
return 1;
}
Where should I put the new code?
Regards
Born2die
Re: PlayerToPoint -
MenaceX^ - 01.03.2009
Try in OnPlayerUpdate, I don't promise anything, I haven't worked with this function much
Re: PlayerToPoint -
1337pr0 - 01.03.2009
Quote:
Originally Posted by MenaceX^
Try in OnPlayerUpdate, I don't promise anything, I haven't worked with this function much
|
If you want it to run 5 times a second, then put it in OnPlayerUpdate. Otherwise, no.
Re: PlayerToPoint -
MenaceX^ - 01.03.2009
OnPlayerUpdate updates itself every 5 seconds?
Re: PlayerToPoint -
Born2die - 02.03.2009
Ok I'll use OnPlayerUpdate for now, will use a timer in the future. Thanks allot guys!