SA-MP Forums Archive
[Ajuda] Teleporte bugado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Teleporte bugado (/showthread.php?tid=646001)



Teleporte bugado - MituhBR - 08.12.2017

eu tava fazendo os teleportes pro gamemode q to criando com o teleport generator. Daн quando liguei o server e fui testar os teleportes eu coloco o comando, dou enter e o personagem teleporta pro limbo + ou -

(sou novato em pawno)

Код:
// > Teleportes

public OnPlayerCommandText(playerid, cmdtext[])
{

// TELE /academials

	if(strcmp(cmdtext,"/academials",true)==0)
	{
	SetPlayerPos(playerid,772.111999,-3.898649,1000.728820);
	SetPlayerInterior(playerid,5);
	GameTextForPlayer(playerid,"BIRL",4000,6);
	return 1;
	}

// TELE /academialv



	if(strcmp(cmdtext,"/academialv",true)==0)
	{
	SetPlayerPos(playerid,773.579956,-77.096694,1000.655029);
	SetPlayerInterior(playerid,7);
	GameTextForPlayer(playerid,"BIRL",4000,6);
	return 1;
	}

// TELE /academiasf

	if(strcmp(cmdtext,"/academiasf",true)==0)
	{
	SetPlayerPos(playerid,774.213989,-48.924297,1000.585937);
	SetPlayerInterior(playerid,6);
	GameTextForPlayer(playerid,"BIRL",4000,6);
	}

// TELE /atrium

	if(strcmp(cmdtext,"/atrium",true)==0)
	{
	SetPlayerPos(playerid,1714.9579, -1654.6006, 24.0422);
	SetPlayerInterior(playerid,18);
	GameTextForPlayer(playerid,"Bem-vindo!",4000,6);
	return 1;
	}

// TELE /banco

	if(strcmp(cmdtext,"/banco",true)==0)
	{
	SetPlayerPos(playerid,2315.952880,-1.618174,26.742187);
	GameTextForPlayer(playerid,"saque ou deposito?",4000,6);
	return 1;
	}

// TELE /caligula - sala escondida

	if(strcmp(cmdtext,"/caligula",true)==0)
	{
	SetPlayerPos(playerid,2131.507812,1600.818481,1008.359375);
	SetPlayerInterior(playerid,1);
	GameTextForPlayer(playerid,"sala escondida",4000,6);
	return 1;
	}

// TELE - /chilliad

	if(strcmp(cmdtext,"/chilliad",true)==0)
	{
	SetPlayerPos(playerid,-2230.4204,-1743.1804,480.8674);
	GameTextForPlayer(playerid,"monte chilliad",4000,6);
	return 1;
	}

// TELE /aerols

	if(strcmp(cmdtext,"/aerols",true)==0)
	{
	SetPlayerPos(playerid,1921.2126, -2282.4697, 23.7169);
	GameTextForPlayer(playerid,"aeroporto ls",4000,6);
	return 1;
	}

// TELE /aerolv

	if(strcmp(cmdtext,"/aerolv",true)==0)
	{
	SetPlayerPos(playerid,1601.5675, 1575.0591, 15.3153);
	GameTextForPlayer(playerid,"aeroporto lv",4000,6);
	return 1;
	}

// TELE /aerosf

	if(strcmp(cmdtext,"/aerosf",true)==0)
	{
	SetPlayerPos(playerid,-1353.3904, -238.2823, 20.6822);
	GameTextForPlayer(playerid,"aeroporto sf",4000,6);
	return 1;
	}

// TELE /ammulv

	if(strcmp(cmdtext,"/ammulv",true)==0)
	{
	SetPlayerPos(playerid,2141.4695,942.4420,10.8203);
	GameTextForPlayer(playerid,"ammunation lv",4000,6);
	return 1;
	}
// TELE /pedreira

	if(strcmp(cmdtext,"/pedreira",true)==0)
	{
	SetPlayerPos(playerid,589.7864,871.5790,-42.4973);
	GameTextForPlayer(playerid,"pedreira lv",4000,6);
	return 1;
	}
// TELE /naviosf

	if(strcmp(cmdtext,"/naviosf",true)==0)
	{
	SetPlayerPos(playerid,1471.1813,1487.9233,8.2501);
	GameTextForPlayer(playerid,"navio sf",4000,6);
	return 1;
	}
// TELE /sf

	if(strcmp(cmdtext,"/sf",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a San Fierro!",4000,6);
	return SetVehiclePos(vehicleid,-2774.0647,-283.9619,7.0468);
	}
	SetPlayerPos(playerid,-2774.0647,-283.9619,7.0468);
	GameTextForPlayer(playerid,"Bem-vindo a San Fierro!",4000,6);
	return 1;
	}
// TELE /bayside

	if(strcmp(cmdtext,"/bayside",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a BaySide!",4000,6);
	return SetVehiclePos(vehicleid,-2262.9133,2289.3657,4.8202);
	}
	SetPlayerPos(playerid,-2262.9133,2289.3657,4.8202);
	GameTextForPlayer(playerid,"Bem-vindo a BaySide!",4000,6);
	return 1;
	}

// TELE /vinewood

	if(strcmp(cmdtext,"/vinewood",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"SOU RYYCAAA!",4000,6);
	return SetVehiclePos(vehicleid,1088.4564,-783.4669,107.3235);
	}
	SetPlayerPos(playerid,1088.4564,-783.4669,107.3235);
	GameTextForPlayer(playerid,"SOU RYYCAAA!",4000,6);
	return 1;
	}

// TELE /lv

	if(strcmp(cmdtext,"/lv",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a Las Venturas!",4000,6);
	return SetVehiclePos(vehicleid,2057.1941,863.6100,6.9993);
	}
	SetPlayerPos(playerid,2057.1941,863.6100,6.9993);
	GameTextForPlayer(playerid,"Bem-vindo a Las Venturas!",4000,6);
	return 1;
	}

// TELE /aeroab

	if(strcmp(cmdtext,"/aeroab",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Aeroporto Abandonado",4000,6);
	return SetVehiclePos(vehicleid,434.2852,2501.7419,16.4922);
	}
	SetPlayerPos(playerid,434.2852,2501.7419,16.4922);
	GameTextForPlayer(playerid,"Aeroporto Abandonado",4000,6);
	return 1;
	}

// TELE /baladasf

	if(strcmp(cmdtext,"/baladasf",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Balada Jizzys SF",4000,6);
	return SetVehiclePos(vehicleid,-2622.7869,1402.9260,7.1016);
	}
	SetPlayerPos(playerid,-2622.7869,1402.9260,7.1016);
	GameTextForPlayer(playerid,"Balada Jizzys SF",4000,6);
	return 1;
	}

// TELE /ls

	if(strcmp(cmdtext,"/ls",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a Los Santos!",4000,6);
	return SetVehiclePos(vehicleid,1445.0802,-2286.7495,13.5469);
	}
	SetPlayerPos(playerid,1445.0802,-2286.7495,13.5469);
	GameTextForPlayer(playerid,"Bem-vindo a Los Santos!",4000,6);
	return 1;
	}

// TELE /fc

	if(strcmp(cmdtext,"/fc",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a Fort Carson!",4000,6);
	return SetVehiclePos(vehicleid,-89.6004,1219.5726,19.7422);
	}
	SetPlayerPos(playerid,-89.6004,1219.5726,19.7422);
	GameTextForPlayer(playerid,"Bem-vindo a Fort Carson!",4000,6);
	return 1;
	}

// TELE /bigear

	if(strcmp(cmdtext,"/bigear",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Big Ear!",4000,6);
	return SetVehiclePos(vehicleid,-364.5181,1529.3843,75.3594);
	}
	SetPlayerPos(playerid,-364.5181,1529.3843,75.3594);
	GameTextForPlayer(playerid,"Big Ear!",4000,6);
	return 1;
	}

// TELE /area51

	if(strcmp(cmdtext,"/area51",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Area 51",4000,6);
	return SetVehiclePos(vehicleid,213.4477,1896.9873,16.7050);
	}
	SetPlayerPos(playerid,213.4477,1896.9873,16.7050);
	GameTextForPlayer(playerid,"Area 51",4000,6);
	return 1;
	}

// TELE /grove

    if(strcmp(cmdtext,"/grove",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Grove Street",4000,6);
	return SetVehiclePos(vehicleid,2492.3914,-1667.4872,13.3438);
	}
	SetPlayerPos(playerid,2492.3914,-1667.4872,13.3438);
	GameTextForPlayer(playerid,"Grove Street",4000,6);
	return 1;
	}

// TELE /transfender

	if(strcmp(cmdtext,"/transfender",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Oficina Transfender",4000,6);
	return SetVehiclePos(vehicleid,2390.8042,1009.5405,10.8203);
	}
	SetPlayerPos(playerid,2390.8042,1009.5405,10.8203);
	GameTextForPlayer(playerid,"Oficina Transfender",4000,6);
	return 1;
	}
	
// TELE /shamal

	if(strcmp(cmdtext,"/shamal",true)==0)
	{
	SetPlayerPos(playerid,1.808619,32.384357,1199.593750);
	SetPlayerInterior(playerid,1);
	GameTextForPlayer(playerid,"Interior - Shamal",4000,6);
	return 1;
	}
	
// TELE /matadouro

	if(strcmp(cmdtext,"/matadouro",true)==0)
	{
	SetPlayerPos(playerid,963.418762,2108.292480,1011.030273);
	SetPlayerInterior(playerid,1);
	GameTextForPlayer(playerid,"Matadouro",4000,6);
	return 1;
	}
	
// TELE /spawn

	if(strcmp(cmdtext,"/spawn",true)==0)
	{
	SetPlayerPos(playerid,2615.4683,1824.1261,10.8203);
	GameTextForPlayer(playerid,"Spawn",4000,6);
	return 1;
	}
	
// TELE /rancho

    if(strcmp(cmdtext,"/rancho",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"rancho fundo",4000,6);
	return SetVehiclePos(vehicleid,-688.2167,955.0200,12.1537);
	}
	SetPlayerPos(playerid,-688.2167,955.0200,12.1537);
	GameTextForPlayer(playerid,"rancho fundo",4000,6);
	return 1;
	}

// TELE /praia

	if(strcmp(cmdtext,"/praia",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bora nadar!",4000,6);
	return SetVehiclePos(vehicleid,227.9339,-1815.5609,4.2493);
	}
	SetPlayerPos(playerid,227.9339,-1815.5609,4.2493);
	GameTextForPlayer(playerid,"Bora nadar!",4000,6);
	return 1;
	}
	
// TELE /ap - angel pine

	if(strcmp(cmdtext,"/ap",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a Angel Pine!",4000,6);
	return SetVehiclePos(vehicleid,-2082.7241,-2534.7473,30);
	}
	SetPlayerPos(playerid,-2082.7241,-2534.7473,30);
	GameTextForPlayer(playerid,"Bem-vindo a Angel Pine!",4000,6);
	return 1;
	}

// TELE /bb - blueberry

	if(strcmp(cmdtext,"/bb",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a BlueBerry!",4000,6);
	return SetVehiclePos(vehicleid,110.8797,-160.2988,1.6468);
	}
	SetPlayerPos(playerid,110.8797,-160.2988,1.6468);
	GameTextForPlayer(playerid,"Bem-vindo a BlueBerry!",4000,6);
	return 1;
	}


// TELE /ilha

	if(strcmp(cmdtext,"/ilha",true)==0)
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"Bem-vindo a Ilha!",4000,6);
	return SetVehiclePos(vehicleid,-2949.9485,387.2340,1.8035);
	}
	SetPlayerPos(playerid,-2949.9485,387.2340,1.8035);
	GameTextForPlayer(playerid,"Bem-vindo a Ilha!",4000,6);
	return 1;
	}

// TELE /favela

	if(strcmp(cmdtext,"/favela",true)==0)
	{
	SetPlayerPos(playerid,2171.4409,-1015.3062,62.9729);
	GameTextForPlayer(playerid,"coeh truta",4000,6);
	return 1;
	}



Re: Teleporte bugado - C4rtm4n - 08.12.2017

Verifique as coordenadas e os Interiores.

Off: a terra nгo й plana,nгo seja retardado.


Re: Teleporte bugado - MituhBR - 08.12.2017

Mas a maioria q n ta funcionando n й interior po eu coloquei o bagulho la pra nгo setar interior


Off: a terra й triangular entгo


Re: Teleporte bugado - MituhBR - 09.12.2017

Desativei o sistema de adm q eu estava usando e funcionou normal os teles do proprio mapa mas quando eu vou em tele de interiores e volto pro mapa normal o teleporte buga e fica num limbo


Re: Teleporte bugado - DiegoLeo - 09.12.2017

Quote:
Originally Posted by MituhBR
Посмотреть сообщение
Desativei o sistema de adm q eu estava usando e funcionou normal os teles do proprio mapa mas quando eu vou em tele de interiores e volto pro mapa normal o teleporte buga e fica num limbo
No comando destes teleportes para o "Mapa Normal", coloque junto a ele o interior 0, como exemplo


PHP код:
[...]
SetPlayerPos(playeridPOSXPOSYPOSZ);
SetPlayerInterior(playerid0);  // Aqui vocк seta o interior 0 que й o interior do "Mundo Normal'
return 1;