Just set timers, the first timer make it do
pawn Код:
SetPlayerPos(X+10, Y+1, Z+3);
Then when that timer stops or maybe while the other is going just change those numbers around
Sounds kinda cool. I might try it, ill let you know how it goes
EDIT: Here is what i quickly wrote;
pawn Код:
forward shunt(targetid);
forward shunt2(targetid);
forward shunt3(targetid);
pawn Код:
new Shunt[MAX_PLAYERS],
Shunt2[MAX_PLAYERS],
Shunt3[MAX_PLAYERS],
shunttimer[MAX_PLAYERS],
shunttimer2[MAX_PLAYERS],
shunttimer3[MAX_PLAYERS];
pawn Код:
public shunt(targetid)
{
if(Shunt[targetid] > 0)
{
new Float:Pos[3];
GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(targetid, Pos[0]+4, Pos[1]+3, Pos[2]+5);
}
else if(Shunt[targetid] == 0)
{
KillTimer(shunttimer[targetid]);
shunttimer2[targetid] = SetTimerEx("shunt2", 1000, true, "f", targetid);
Shunt2[targetid] = 3;
}
return 1;
}
public shunt2(targetid)
{
if(Shunt2[targetid] > 0)
{
new Float:Pos[3];
GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(targetid, Pos[0]+4, Pos[1]-6, Pos[2]);
}
else if(Shunt2[targetid] == 0)
{
KillTimer(shunttimer2[targetid]);
shunttimer3[targetid] = SetTimerEx("shunt2", 1000, true, "f", targetid);
Shunt3[targetid] = 3;
}
return 1;
}
public shunt3(targetid)
{
if(Shunt3[targetid] > 0)
{
new Float:Pos[3];
GetPlayerPos(targetid, Pos[0], Pos[1], Pos[2]);
SetPlayerPos(targetid, Pos[0]+6.3, Pos[1]+82, Pos[2]+4);
}
else if(Shunt3[targetid] == 0)
{
KillTimer(shunttimer3[targetid]);
SendClientMessage(targetid, COLOR_RED, "Bitch you just got fucked up");
}
return 1;
}
I made the command for my server so its going to be different functions etc, just change them to your needs
pawn Код:
CMD:shunt(playerid, params[])
{
if(!IsAdmin(playerid, 5)) return ErrorMsg(playerid);
new targetid, string[148];
if(sscanf(params, "u", targetid)) return Usage(playerid, "/shunt [player]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected");
shunttimer[targetid] = SetTimerEx("shunt", 1000, true, "f", targetid);
Shunt[targetid] = 3;
format(string, sizeof(string), "You have shunted %s(%i)", Name(targetid), targetid);
SendClientMessage(playerid, COLOR_ADMIN, string);
return 1;
}