10.01.2018, 10:13
I need a script that makes it so player follow the player wherever he goes.
new Drags[MAX_PLAYERS];
Drags[playerid] = SetTimerEx("DragPlayer", 3000, true, "ii", playerid, draggingid) // Replace playerid and draggerid to the ID's of the players...
//playerid is the player who is dragging, and the draggingid is the id of the player getting dragged.
forward DragPlayer(playerid, draggingid);
public DragPlayer(playerid, draggingid)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(draggingid, X+1, Y, Z+1);
return 1;
}
KillTimer(Drags[playerid]); //Replace the playerid with the id of the dragger.