10.12.2015, 12:46
Hello again. I was wondering how can I add an animation for the player when getting tazed? Perhaps just a /crack animation or some shit here's the code:
Код:
forward TazeTimer(playerid);
public TazeTimer(playerid)
{
if(IsPlayerLoggedIn(playerid))
{
new string[128];
if (TazeTimeout[playerid] > 0)
{
format(string,sizeof(string),"~n~~n~~n~~n~~n~~n~~n~~n~~r~Tazer effect fading in ~w~%d ~r~seconds", TazeTimeout[playerid]);
GameTextForPlayer(playerid, string,1500, 3);
TazeTimeout[playerid] -= 1;
}
if(TazeTimeout[playerid] <= 0)
{
KillTimer(TazeCountDown[playerid]);
TogglePlayerControllable(playerid, 1);
ClearAnimations(playerid);
TogglePlayerTazed(playerid, 0);
}
}
return 1;
}


