Little Problem
#1

My problem is that. When I'm inside any vehicle and teleport to some of my map, Let say /ls then the vehicle automatically destroyed and it says "MyName has Teleported to Los Santos"
but I'm still in my parkour map. Any idea?


pawn Код:
cmd:parkour(playerid,params[])
{
                    new string[128], pName[MAX_PLAYER_NAME];
                    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
                    format(string, sizeof(string), "{6666FF}(/parkour) {00CCFF}%s {6666FF}has Teleported to Parkour 1",pName);
                    SendClientMessageToAll(0xFFFFFFFF, string);
                    SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
                    GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Parkour 1",2000,3);
                    SetCameraBehindPlayer(playerid);
                    SetPlayerVirtualWorld(playerid, 17);
                    SetPlayerInterior(playerid, 0);
                    DestroyVehicle(GetPlayerVehicleID(playerid));
return 1;
}
Reply
#2

Maybe you can try destroying your vehicle before teleporting? Not sure if it would make difference.

1) DestroyVehicle(GetPlayerVehicleID(playerid));
2) SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
Reply
#3

If you want to teleport with your vehicle use this:
pawn Код:
new string[128], pName[MAX_PLAYER_NAME], vehicle, seat;
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{6666FF}(/parkour) {00CCFF}%s {6666FF}has Teleported to Parkour 1",pName);
        SendClientMessageToAll(0xFFFFFFFF, string);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Parkour 1",2000,3);
        SetPlayerVirtualWorld(playerid, 17);
        SetPlayerInterior(playerid, 0);
        GivePlayerMoney(playerid,150213);
        seat = GetPlayerVehicleSeat(playerid);
        vehicle = GetPlayerVehicleID(playerid);
        SetVehiclePos(vehicle,-2245.6714,-1718.3846,480.3323);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        PutPlayerInVehicle(playerid, vehicle, seat);
        return 1;
Or if you only want to teleport yourself and destroy the vehicle

pawn Код:
new string[128], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{6666FF}(/parkour) {00CCFF}%s {6666FF}has Teleported to Parkour 1",pName);
        SendClientMessageToAll(0xFFFFFFFF, string);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Parkour 1",2000,3);
        SetPlayerVirtualWorld(playerid, 17);
        SetPlayerInterior(playerid, 0);
        GivePlayerMoney(playerid,150213);
        DestroyVehicle(GetPlayerVehicleID(playerid));
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        return 1;
Reply
#4

Quote:
Originally Posted by MarinacMrcina
Посмотреть сообщение
If you want to teleport with your vehicle use this:
pawn Код:
new string[128], pName[MAX_PLAYER_NAME], vehicle, seat;
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{6666FF}(/parkour) {00CCFF}%s {6666FF}has Teleported to Parkour 1",pName);
        SendClientMessageToAll(0xFFFFFFFF, string);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Parkour 1",2000,3);
        SetPlayerVirtualWorld(playerid, 17);
        SetPlayerInterior(playerid, 0);
        GivePlayerMoney(playerid,150213);
        seat = GetPlayerVehicleSeat(playerid);
        vehicle = GetPlayerVehicleID(playerid);
        SetVehiclePos(vehicle,-2245.6714,-1718.3846,480.3323);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        PutPlayerInVehicle(playerid, vehicle, seat);
        return 1;
Or if you only want to teleport yourself and destroy the vehicle

pawn Код:
new string[128], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{6666FF}(/parkour) {00CCFF}%s {6666FF}has Teleported to Parkour 1",pName);
        SendClientMessageToAll(0xFFFFFFFF, string);
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        GameTextForPlayer(playerid,"~y~Welcome to ~n~~b~Parkour 1",2000,3);
        SetPlayerVirtualWorld(playerid, 17);
        SetPlayerInterior(playerid, 0);
        GivePlayerMoney(playerid,150213);
        DestroyVehicle(GetPlayerVehicleID(playerid));
        SetPlayerPos(playerid, -2245.6714,-1718.3846,480.3323);
        return 1;
I have choose the 2nd one. It works it deletes your current vehicle when you are in the other map except in /parkour. But it's not the problem.

Let's say im in Las Venturas then I do /parkour yes it destoy the vehicle im in. But when I leave parkour with my vehicle doing other teleport commands like /sf /aa/ /lva and so on.. The only teleporting is the vehicle.
Reply
#5

Anyone know what could be the problem? its in the vehicle,virtual world of something else?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)