SA-MP Forums Archive
[HELP] Playertopoint execute withou doing anything! - 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: [HELP] Playertopoint execute withou doing anything! (/showthread.php?tid=161357)



[HELP] Playertopoint execute withou doing anything! - WThieves - 19.07.2010

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


Re: [HELP] Playertopoint execute withou doing anything! - bartje01 - 19.07.2010

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


Re: [HELP] Playertopoint execute withou doing anything! - Kar - 19.07.2010

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


Re: [HELP] Playertopoint execute withou doing anything! - WThieves - 19.07.2010

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!!