What callback should i use ?
#1

Hey guys i put this marker as DynamicObject in the interiors, what callback should i use? to check if the player in the marker or not ? to send him to outside of the interior.

Reply
#2

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Hmm, you created it as an object...
Is there another method ?

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
try IsPlayerInTheRangeOfPoint, with the coords of the object
yeah i tried this, but i found a problem then, there are about 10 of 24/7 stores in the server, so i use virtual worlds, so how to use "IsPlayerInRangeOfPoint and check which virtual world is the player in ? cause each of virtual worlds has it's exit coordinates.
Reply
#3

If the virtual world change the coordinates wont change, and you still can check if the player is at X,Y,Z location what is wrong with that?
Reply
#4

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Another method ? :)

CreatePickup(1559, 1, 0.0, 0.0, 5.0, -1);

public OnPlayerPickUpPickup(playerid, pickupid)
i think of that, but i think this will destroy the pickup maybe and will not create it again?
#This is the first time i'll use pickups in the server, so i don't know how it should work, that's why i'm asking :)

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
If the virtual world change the coordinates wont change, and you still can check if the player is at X,Y,Z location what is wrong with that?
Well here you go: Imagine that i have 2 stores with the same interior ids, but different places in map, 1 in Las Venturas and the other in San Fierro, so it must be there a different virtual worlds too.
So each object "1559" in these 2 stores must have different exit positions, the first 1 must send the player outside the store in las venturas and the other one must send the player outside the store in SF.

if you didn't get it, see this:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of LV (Virual World = 1)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, 43.44, 23.665, 3433.444); //outside the store that is in LV
}
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of SF (Same Coordinates) (Virual World = 2)
{
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, 234.4222, 2343.2303, 2346.4421); //Not same coordinates because this store's outside in SF not LV
}
//So it will make a bug because IsPlayerInRangeOfPoint has the same coordinates but different outside coordinates, so that's the problem.
Reply
#5

Ohh, I understand now but try checking for the virtual world too?

E.g:

pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 1.0, -12.232, 145.22, 14.2222) //The object that is in the store of LV (Virual World = 1)
{
    if(GetPlayerVirtualWorld(playerid) == 1)
    {
         SetPlayerInterior(playerid, 0);
         SetPlayerVirtualWorld(playerid, 0);
         SetPlayerPos(playerid, 43.44, 23.665, 3433.444); //outside the store that is in LV
    }
}
Like that? ^^^
Reply
#6

Is this possible ? o_O
Can i use GetPlayerVirtualWorld in "if" statement ?
Reply
#7

Well I think so, just try it?
Reply
#8

Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
Is this possible ? o_O
Can i use GetPlayerVirtualWorld in "if" statement ?
You can.

pawn Код:
if(GetPlayerVirtualWorld(playerid) == /*virtual world here*/)
{
  // code.
}
Reply
#9

Quote:
Originally Posted by Twizted
Посмотреть сообщение
You can.

pawn Код:
if(GetPlayerVirtualWorld(playerid) == /*virtual world here*/)
{
  // code.
}
That's what I have exactly wrote ^
Reply
#10

Thanks all for helping, Worked!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)