21.01.2012, 23:48
You can use OnPlayerUpdate or timer if OnPlayerUpdate is too fast
connect/disconnect
in /drag id
pawn Код:
new Jailed[MAX_PLAYERS]={999,...};
pawn Код:
if(Jailed[playerid] != 999)
Jailed[Jailed[playerid]] = 999;
Jailed[playerid] = 999;
pawn Код:
Jailed[giveplyerid] = playerid;
pawn Код:
public OnPlayerUpdate(playerid)
{
if(Jailed[playerid] != 999)
{
new Float:P[4];
GetPlayerPos(Jailed[playerid],P[0],P[1],P[2]);
GetPlayerFacingAngle(Jailed[playerid],P[3]);
P[0] -= (2.5 * floatsin(-P[3], degrees));
P[1] -= (2.5 * floatcos(-P[3], degrees));
SetPlayerPos(playerid,P[0],P[1],P[2]);
SetPlayerFacingAngle(playerid,P[3]);
}
return 1;
}