Attach player to another player
#2

This?

pawn Код:
stock AttachPlayerToPlayer(playerid, giveplayerid, Float: behind = 2.0)
{
     new Float: pos[3];
     GetPlayerPos(giveplayerid, pos[0], pos[1], pos[2]);
     SetPlayerPos(playerid, pos[0]-behind, pos[1], pos[2]);
     UpdateTimer[playerid] = SetTimerEx("AttachUpdate", 1000, true, "iif", playerid, giveplayerid, behind);
     Attached[playerid] = true;
}

stock DetachPlayer(playerid)
{
  KillTimer(UpdateTimer[playerid]);
  Attached[playerid] = false;
  return true;
}

public AttachUpdate(playerid, giveplayerid, Float: behind = 2.0)
{
    new Float: pos[3];
    GetPlayerPos(giveplayerid, pos[0], pos[1], pos[2]);
    SetPlayerPos(playerid, pos[0]-behind, pos[1], pos[2]);
    return true;
}
Reply


Messages In This Thread
Attach player to another player - by Anuris - 18.10.2014, 20:36
Re: Attach player to another player - by Abagail - 18.10.2014, 20:41

Forum Jump:


Users browsing this thread: 1 Guest(s)