Question for IsPlayerInRangeOfPoint
#1

Can this function be worked in a virtual world? I'm making a small sumo minigame so I'd like to know. Cheers.
Reply
#2

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

Yes for a certain one.
Reply
#4

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

check for only one Vworld?
ima write something for that
Reply
#6

Of cours it will.
Reply
#7

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?
            }
         }
      }
}
Reply
#8

can't do it pawno messed up...
Reply
#9

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

Sorry Ryder,I fixed it now.

Thank you for informing me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)