teleport 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: teleport problem (
/showthread.php?tid=470782)
teleport problem -
kbalor - 19.10.2013
The problem if we are inside a vehicle and I'am the passenger when I teleport to somewhere the vehicle and the owner himself also teleport to what I have chosen. It should be ONLY ME. Without the driver and his vehicle.
Re: teleport problem -
]Rafaellos[ - 19.10.2013
Just replace you'r vehicle check with
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
and everything will be fine.
Re: teleport problem -
-Prodigy- - 19.10.2013
Show the command you are using to teleport.
Re: teleport problem -
kbalor - 19.10.2013
This
Код:
CMD:rm(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
SetPlayerPos(playerid, -4411.3794,4207.3994,187.6803);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
}
else
{
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, -4411.3794,4207.3994,187.6803);
SetVehicleZAngle(veh, 0);
LinkVehicleToInterior(veh, 0);
SetVehicleVirtualWorld(veh, 0);
PutPlayerInVehicle(playerid, veh, 0);
SetCameraBehindPlayer(playerid);
}
}
Re: teleport problem -
]Rafaellos[ - 19.10.2013
pawn Код:
CMD:rm(playerid, params[])
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new veh = GetPlayerVehicleID(playerid);
SetVehiclePos(veh, -4411.3794,4207.3994,187.6803);
SetVehicleZAngle(veh, 0);
LinkVehicleToInterior(veh, 0);
SetVehicleVirtualWorld(veh, 0);
PutPlayerInVehicle(playerid, veh, 0);
SetCameraBehindPlayer(playerid);
}
else
{
SetPlayerPos(playerid, -4411.3794,4207.3994,187.6803);
SetPlayerFacingAngle(playerid, 0);
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetCameraBehindPlayer(playerid);
}
return 1;
}
Re: teleport problem -
kbalor - 19.10.2013
Quote:
Originally Posted by ]Rafaellos[
pawn Код:
CMD:rm(playerid, params[]) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new veh = GetPlayerVehicleID(playerid); SetVehiclePos(veh, -4411.3794,4207.3994,187.6803); SetVehicleZAngle(veh, 0); LinkVehicleToInterior(veh, 0); SetVehicleVirtualWorld(veh, 0); PutPlayerInVehicle(playerid, veh, 0); SetCameraBehindPlayer(playerid); } else { SetPlayerPos(playerid, -4411.3794,4207.3994,187.6803); SetPlayerFacingAngle(playerid, 0); SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0); SetCameraBehindPlayer(playerid); } return 1; }
|
So I sit as a passenger and there was no driver empty only me in the passenger sit. Then I do /rm it teleports me to the place then I automatically switched passenger to driver is that normal?
Right now I haven't tried with driver coz im the only one in the server.