Attach player to another player
#1

Hello.

Guys, is that possible to attach one player to another one?
I mean, one player moves and another one do the same move.

Sorry for my English.
Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)