SA-MP Forums Archive
I need a little help plz - 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: I need a little help plz (/showthread.php?tid=121732)



I need a little help plz - Stig - 18.01.2010

Could someone plz give me an example of a (race) checkpoint that only appears when a player is near it, so i will be able to use on player enter race checkpoint callback.
Thanks for any help in advance.


Re: I need a little help plz - deather - 18.01.2010

Use IsPlayerInRangeOfPoint function

Read more : https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


Re: I need a little help plz - Stig - 18.01.2010

yeah, i read that wiki thing isplayerinrangeofpoint before, it wont do what i want it to, thats why i asked for an example.
Thanks for your time.


Re: I need a little help plz - kmzr - 18.01.2010

Just do
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, xAngle, yAngle, zAngle))
  {
  // code here.
  }



Re: I need a little help plz - Stig - 18.01.2010

thankyou kmzr,
i know that bit, i just dont know where to put it in my gamemode, thats why i asked for an example.
Thanks for your time.

Anyone else plz ?


Re: I need a little help plz - deather - 18.01.2010

You can use it in :
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}
or
Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}



Re: I need a little help plz - Stig - 18.01.2010

Thank's. Gonna try it now.


Peace....