02.04.2014, 19:48
You can call a timer in the drag command for something like this:
forward DragPlayer(playerid, giveplayerid);
public DragPlayer(playerid, giveplayerid)
{
if(giveplayerid == INVALID_PLAYER_ID) return 0;
if(Dragging[playerid] != INVALID_PLAYER_ID)
{
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(giveplayerid, x, y, z);
(Call the timer again if you want)
}
return 1;
}
forward DragPlayer(playerid, giveplayerid);
public DragPlayer(playerid, giveplayerid)
{
if(giveplayerid == INVALID_PLAYER_ID) return 0;
if(Dragging[playerid] != INVALID_PLAYER_ID)
{
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(giveplayerid, x, y, z);
(Call the timer again if you want)
}
return 1;
}