#4

Quote:
Originally Posted by lamarr007
Посмотреть сообщение
Use my function:
pawn Код:
stock TeleportPlayerTo(playerid, interior, Float:x, Float:y, Float:z, Float:angle)
{
    SetPlayerInterior(playerid, interior);
    if(IsPlayerInAnyVehicle(playerid)){
    new vehicle = GetPlayerVehicleID(playerid);
    SetVehicleVirtualWorld(vehicle, vworld);
    LinkVehicleToInterior(vehicle, interior);
    SetVehiclePos(vehicle, x, y, z);
    SetVehicleZAngle(vehicle, angle);
    SetCameraBehindPlayer(playerid);}else{
    SetPlayerPos(playerid, x, y, z);
    SetPlayerFacingAngle(playerid, angle);
    SetCameraBehindPlayer(playerid);}
}
Wrong.
if(IsPlayerInAnyVehicle(playerid)) would still detect passengers as well. So if they are driving along with somebody and decide to teleport, the driver of the vehicle will be teleported with them... not very convenient.
Reply


Messages In This Thread
why? - by Windrush - 25.08.2012, 12:44
Re: why? - by clarencecuzz - 25.08.2012, 12:48
Re: why? - by lamarr007 - 25.08.2012, 12:53
Re: why? - by clarencecuzz - 25.08.2012, 12:55
Re: why? - by lamarr007 - 25.08.2012, 13:14

Forum Jump:


Users browsing this thread: 1 Guest(s)