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;
|