Vehicle Streaming [Q]
#1

Is there any callback like:

pawn Код:
IsVehicleStreamedForPlayer(playerid,vehicleid)
It should work with:

pawn Код:
OnVehicleStreamIn(vehicleid,forplayerid)
OnVehicleStreamOut(vehicleid,forplayerid)
Hmm?
Reply
#2

Can't find it on wiki, so, I don't think that this exsists.
Reply
#3

Surely you could use IsPlayerInRangeOfPoint?

For example:

pawn Код:
stock IsVehicleStreamedInForPlayer(playerid, vehicleid)
{
     new Float:x, Float:y, Float:z;
     GetVehiclePos(vehicleid, x, y, z);
     if(IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z) return 1;
     return 0;
}
returns 1 if they are near enough the vehicle, 0 otherwise.
Reply
#4

Quote:
Originally Posted by funky1234
Посмотреть сообщение
Surely you could use IsPlayerInRangeOfPoint?

For example:

pawn Код:
stock IsVehicleStreamedInForPlayer(playerid, vehicleid)
{
     new Float:x, Float:y, Float:z;
     GetVehiclePos(vehicleid, x, y, z);
     if(IsPlayerInRangeOfPoint(playerid, 15.0, x, y, z) return 1;
     return 0;
}
returns 1 if they are near enough the vehicle, 0 otherwise.
What's the distance when the cars get streamed?
Reply
#5

You can't even make a code like this?
pawn Код:
new bool:Streamed[MAX_VEHICLES][MAX_PLAYERS];

public OnPlayerConnect(playerid) for(new i;i<MAX_VEHICLES;i++) Streamed[i][playerid]=false;

stock IsVehicleStreamedInForPlayer(playerid,vehicleid) return Streamed[vehicleid][playerid];
public OnVehicleStreamIn(vehicleid,forplayerid)
{
    Streamed[vehicleid][playerid]=true;
}
public OnVehicleStreamOut(vehicleid,forplayerid)
{
   Streamed[vehicleid][playerid]=false;
}
Reply
#6

Quote:
Originally Posted by wups
Посмотреть сообщение
You can't even make a code like this?
pawn Код:
new bool:Streamed[MAX_VEHICLES][MAX_PLAYERS];

public OnPlayerConnect(playerid) for(new i;i<MAX_VEHICLES;i++) Streamed[i][playerid]=false;

stock IsVehicleStreamedInForPlayer(playerid,vehicleid) return Streamed[vehicleid][playerid];
public OnVehicleStreamIn(vehicleid,forplayerid)
{
    Streamed[vehicleid][playerid]=true;
}
public OnVehicleStreamOut(vehicleid,forplayerid)
{
   Streamed[vehicleid][playerid]=false;
}
Great!

Didn't think about that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)