SA-MP Forums Archive
Teleporting problem - 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)
+--- Thread: Teleporting problem (/showthread.php?tid=380207)



Teleporting problem - .v - 24.09.2012

Hello guys I noticed something is wrong after I teleport somewhere everytime i'm in a parkour with a vehicle.

I do /parkour, basically I moved to parkour place/map. Right after, I spawn a vehicle it spawned perfectly then if I do teleport to other place, let say /aa my vehicle only teleport but my character is not, I was still in parkour and it just remove me from the vehicle.

But when i'm in parkour ONFOOT then do teleport somewhere, I just teleport. Just what I wanted.

pawn Код:
CMD:parkour(playerid, params[])
{
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
    SetPlayerFacingAngle(playerid, 0.0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 17);
    DestroyVehicle(GetPlayerVehicleID(playerid));
I don't know but problem only occurs when i'm inside a vehicle.


Re: Teleporting problem - XtremeR - 24.09.2012

pawn Код:
CMD:parkour(playerid, params[])
{
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
    SetPlayerFacingAngle(playerid, 0.0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    if(IsPlayerInVehicle(playerid, vehicleid))
    {
     vehicleid = GetPlayerVehicleID(playerid);
    SetVehiclePos(vehicleid, -2245.6714,-1718.3846,480.3323);
    }



Re: Teleporting problem - Pro_Drifter - 24.09.2012

pawn Код:
if (!strcmp("/parkour", cmdtext, true))
{
    SetPlayerPosWithVehicle(playerid, -2245.6714,-1718.3846,480.3323, cmdtext);
    return 1;
}



Re: Teleporting problem - .v - 24.09.2012

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
pawn Код:
CMD:parkour(playerid, params[])
{
    SetCameraBehindPlayer(playerid);
    SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
    SetPlayerFacingAngle(playerid, 0.0);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    if(IsPlayerInVehicle(playerid, vehicleid))
    {
     vehicleid = GetPlayerVehicleID(playerid);
    SetVehiclePos(vehicleid, -2245.6714,-1718.3846,480.3323);
    }
Hi thanks for the reply now I got this warning

Код:
error 017: undefined symbol "vehicleid"



Re: Teleporting problem - Pro_Drifter - 24.09.2012

the warning isnt anything
dont worry
just copy this that i sent you its more sipmle than yours exists allready


Re: Teleporting problem - .v - 24.09.2012

Quote:
Originally Posted by Pro_Drifter
Посмотреть сообщение
the warning isnt anything
dont worry
just copy this that i sent you its more sipmle than yours exists allready
error 017: undefined symbol "SetPlayerPosWithVehicle' weird haven't seen this native before.


Re: Teleporting problem - .v - 24.09.2012

Sorry guys but no works after I teleport somewhere vehicle just destroy.

Also I think you didn't get me XD I mean when i'm IN PARKOUR then teleport the vehicle just destroy and me, myself or my character didn't move or teleported where I wanted.

It says You have been teleported to Abandoned Airport but I was still in parkour