OnPlayerClickPlayer Teleport
#5

Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new Float: X,Float:Y, Float:Z, string[70];
    GetPlayerPos(clickedplayerid, X,Y,Z);
    SetPlayerPos(playerid, X,Y,Z);
    format(string, sizeof(string), "You have teleported to ID: %i", clickedplayerid);
    return 1;
}
Quote:
Originally Posted by iggy1
Посмотреть сообщение
Well i wrote some code and lorenc_ posted but ill post mine anyway as it does other things.

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    new
        world,interior,
        Float:x, Float:y, Float:z, Float:angle;

    world = GetPlayerVirtualWorld(playerid);
    interior = GetPlayerInterior(playerid);
    GetPlayerPos(clickedplayerid, x, y, z);
    GetPlayerFacingAngle(clickedplayerid, angle);
   
    SetPlayerPos(playerid, x, y, z+0.2);
    SetPlayerFacingAngle(playerid, angle);
    SetCameraBehindPlayer(playerid);
    SetPlayerVirtualWorld(playerid, world);
    SetPlayerInterior(playerid, interior);
    return 1;
}
Quote:
Originally Posted by Lorenc_
Посмотреть сообщение
Yes i would suggest iggy's because its got interior checking and other cool stuff, mines pretty straight of basic (lol took me 20 seconds to type that without pawno -.-)
Yeah ok thank you guys ^^ im going to test them both ... maybe someone's don't work
Reply


Messages In This Thread
OnPlayerClickPlayer Teleport - by Michael@Belgium - 27.01.2011, 08:12
Re: OnPlayerClickPlayer Teleport - by Lorenc_ - 27.01.2011, 08:24
Re: OnPlayerClickPlayer Teleport - by iggy1 - 27.01.2011, 08:26
Re: OnPlayerClickPlayer Teleport - by Lorenc_ - 27.01.2011, 08:28
Re: OnPlayerClickPlayer Teleport - by Michael@Belgium - 27.01.2011, 09:26

Forum Jump:


Users browsing this thread: 1 Guest(s)