22.12.2012, 08:12
hello, i creating SetPlayerPosEx(playerid, x,y,z,vw);
and i have problem, code:
and when i first time teleport to sanfierro (virtualworld 0) its teleport with no vehicle, and in second time when teleport, then teleport with vehicle, and third time when i teleport in stunt (virtualworld 2) then teleport in 0 virtualworld ( and in this time teleport only vehicle in those virtualworld) and fourth time when teleport in stunt (vw 2) teleport in virtualworld, and i can see the vehicle when teleported in third time, help, where it's a bug?
sorry for bad english.
and i have problem, code:
pawn Код:
stock SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,vw = 0)
{
new cartype = GetPlayerVehicleID(playerid);
new State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SetPlayerPos(playerid, x, y ,z);
SetPlayerVirtualWorld(playerid, vw);
}
else if(IsPlayerInVehicle(playerid, cartype) == 1)
{
SetVehiclePos(cartype,x,y,z);
SetVehicleVirtualWorld(cartype, vw);
SetVehicleZAngle(cartype,91);
}
else
{
SetPlayerPos(playerid,x,y,z);
SetPlayerVirtualWorld(playerid, vw);
}
return 1;
}
sorry for bad english.