SA-MP Forums Archive
[Pedido] Teleporte OnPlayerClickMap - 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: [Pedido] Teleporte OnPlayerClickMap (/showthread.php?tid=639535)



Teleporte OnPlayerClickMap - WalterSantos - 19.08.2017

Bom nгo sei se й essa funзгo, mas queria uma base, de se poder teleportar usando aquele mapa do ESC, tipo marcando e ser teletransportado para lб, e que tivesse jeito de ir com veiculo tambйm sу procuro uma base para estudos..


Re: Teleporte OnPlayerClickMap - JPedro - 19.08.2017

https://sampwiki.blast.hk/wiki/OnPlayerClickMap

Код:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    SetPlayerPos(playerid, fX, fY, fZ); 
    return 1;
}
Pro comando ficar 100%, vc precisarб do MapAndreas ou o ColAndreas pra pegar o Eixo Z correto daquele local, caso contrбrio o player vai spawnar debaixo do mapa


Re: Teleporte OnPlayerClickMap - GuiKommander - 19.08.2017

Jб tem isso aqui em meu gm a mt tempo .. bom uso
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
new S[128];
if((IsPlayerInAnyVehicle(playerid)) && (GetPlayerState(playerid) == 2))
{
SetVehiclePos(GetPlayerVehicleID(playerid), fX, fY, fZ);
format(S, sizeof(S), "Vocк foi teletransportado para as coordenadas %.1f, %.1f, %.1f - Com veнculo.", fX, fY, fZ);
SendClientMessage(playerid, -1, S);
}
else
{
SetPlayerPosFindZ(playerid, fX, fY, fZ);
format(S, sizeof(S), "Vocк foi teletransportado para as coordenadas %.1f, %.1f, %.1f - Apй.", fX, fY, fZ);
SendClientMessage(playerid, -1, S);
}
return 1;
}