SA-MP Forums Archive
[Ajuda] OnPlayerClickPlayer usado como teleport? - 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] OnPlayerClickPlayer usado como teleport? (/showthread.php?tid=374028)



OnPlayerClickPlayer usado como teleport? - Gleisson_. - 01.09.2012

Ae galera, eu estou tentando fazer que quando o player clicka no outro player, no OnPlayerClickPlayer, ele seja teleportado.

Mais eu nem sei por onde comeзar o cуdigo, oque usar.

Se puder posta ae pra mim

Cуdigo que eu fiz:
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new Float:x, Float:y, Float:z;
    SetPlayerPos(clickedplayerid, x+2, y, z);
    GetPlayerInterior(clickedplayerid); && SetPlayerInterior(clickedplayerid);
    return 1;
}



Re: OnPlayerClickPlayer usado como teleport? - leonardo1434 - 01.09.2012

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    static Float:x, Float:y, Float:z;
    GetPlayerPos(clickedplayerid, x , y , z);
    SetPlayerPos(playerid, x + 2 , y , z);
    SetPlayerInterior(playerid, GetPlayerInterior(clickedplayerid));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(playerid));
    return 1;
}



Re: OnPlayerClickPlayer usado como teleport? - .FuneraL. - 01.09.2012

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
      new Float:x, Float:y, Float:z;
      GetPlayerPos(clickedplayerid, x, y, z);
      SetPlayerPos(playerid, x+2, y, z), SetPlayerInterior(playerid, GetPlayerInterior(clickedplayerid)), SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(clickedplayerid));
      return 1;
}



Re: OnPlayerClickPlayer usado como teleport? - Sampizito - 01.09.2012

Faltou so o GetPlayerPos(x,y,z)..



@Edit

Nen tinha visto que havia postado jб '-'

@Off

500 posts -**-*


Re: OnPlayerClickPlayer usado como teleport? - Gleisson_. - 01.09.2012

Vlwww cara.