PlayerToPoint
#1

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
Reply
#2

Try in OnPlayerUpdate, I don't promise anything, I haven't worked with this function much
Reply
#3

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.
Reply
#4

OnPlayerUpdate updates itself every 5 seconds?
Reply
#5

Ok I'll use OnPlayerUpdate for now, will use a timer in the future. Thanks allot guys!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)