[HELP] Playertopoint execute withou doing anything!
#1

Hello there i have this, and i need your help with it:
pawn Код:
if (PlayerToPoint(3.0, playerid,1043.50976562,2366.23144531,24.25000000))
                {
                if(cars[playerid]==0)
                {
 //Blablabla
                }
                if (PlayerToPoint(3.0, playerid,1043.50976562,2366.23144531,16.25000000))
                {
                if(cars[playerid]==1)
                {
 //Blablabla
                }
Now there is nothing wrong with it, but i dont know where to put it because i want it to be executed when i enter the place the point is at, this means i just have to walk tot the point(no commands needed).

Thanks in advance!

PS: if somebody knows how to set cars to 1 for everyone if cars is zero (even the players that are not connected yet) that would be great because i can only set it for 1 player
Reply
#2

Well, I always put it @ onplayerupdate. But people are saying, that will make lag in your server so I'm not sure where to put it else :P
Reply
#3

make a new onplayerupdate

onupdate i use for mine

forward onupdate();
public onupdate()
//stuff here

ongamemode init set a timer for 1 second to check
Reply
#4

Quote:
Originally Posted by Kar
Посмотреть сообщение
make a new onplayerupdate

onupdate i use for mine

forward onupdate();
public onupdate()
//stuff here

ongamemode init set a timer for 1 second to check
Thank you man!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)