Question for IsPlayerInRangeOfPoint - 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: Question for IsPlayerInRangeOfPoint (
/showthread.php?tid=159541)
Question for IsPlayerInRangeOfPoint -
TheNuttyScientist - 13.07.2010
Can this function be worked in a virtual world? I'm making a small sumo minigame so I'd like to know. Cheers.
Re: Question for IsPlayerInRangeOfPoint -
[XST]O_x - 13.07.2010
You mean,work for a certain virtual world,and for any other no?
Else,I think it'll work for all of the virtual worlds.
Re: Question for IsPlayerInRangeOfPoint -
TheNuttyScientist - 13.07.2010
Yes for a certain one.
Re: Question for IsPlayerInRangeOfPoint -
[XST]O_x - 13.07.2010
Well you can use a loop to check what players are in a certain virtual world,and then check if the players that are in the certain virtual world are in a range of a certain point.
Re: Question for IsPlayerInRangeOfPoint -
legodude - 13.07.2010
check for only one Vworld?
ima write something for that
Re: Question for IsPlayerInRangeOfPoint -
RyDeR` - 13.07.2010
Of cours it will.
Re: Question for IsPlayerInRangeOfPoint -
[XST]O_x - 13.07.2010
Quote:
Originally Posted by RyDeR`
Of cours it will.
|
As I understood,he wants the function to affect only if a player is in a certain virtual world.
You can do this:
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerVirtualWorld(i) == /*the virtual world you want*/)
{
if(IsPlayerInRangeOfPoint(i,range,x,y,z))
{
//What you want to happen?
}
}
}
}
Re: Question for IsPlayerInRangeOfPoint -
legodude - 13.07.2010
can't do it pawno messed up...
Re: Question for IsPlayerInRangeOfPoint -
RyDeR` - 13.07.2010
Quote:
Originally Posted by [XST]O_x
As I understood,he wants the function to affect only if a player is in a certain virtual world.
You can do this:
pawn Код:
for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(GetPlayerVirtualWorld(i) == /*the virtual world you want*/) { if(IsPlayerInRangeOfPoint(i,range,x,y,z) { //What you want to happen? } } } }
|
You miss a ')' in this line:
if(IsPlayerInRangeOfPoint(i,range,x,y,z)
also I sorry, I understood it wrong :/ Should read more carfull next time
Re: Question for IsPlayerInRangeOfPoint -
[XST]O_x - 13.07.2010
Sorry Ryder,I fixed it now.
Thank you for informing me