new animacao_forcada3[MAX_PLAYERS];
if(MedicTime[i] == 1) //Momento que o Timer й iniciado
{
animacao_forcada3[i] = SetTimerEx("AnimacaoEmComa", 1500, true, "i", i);
}
if(MedicTime[i] >= NeedMedicTime[i]) //Momento que o Timer й desativado(na maioria das vezes nгo й funcional)
{
KillTimer(animacao_forcada3[i]);
//Pois executa os cуdigos abaixo, e й executado o KillTimer tambйm mais nгo desativa a anim.
}
forward AnimacaoEmComa(playerid);
public AnimacaoEmComa(playerid)
{
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 120000, 0);
}
if (strcmp(cmd, "/altadebug", true) == 0)
{
if (IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /altadebug [ID/Nome]");
return true;
}
giveplayerid = ReturnUser(tmp);
if (IsPlayerConnected(giveplayerid))
{
TogglePlayerControllable(giveplayerid, 1);
KillTimer(animacao_forcada3[giveplayerid]);
ClearAnimations(giveplayerid);
SetPlayerSpecialAction(giveplayerid, SPECIAL_ACTION_NONE);
}
return true;
}
}
return true;
}
//Pois executa os cуdigos abaixo, e й executado o KillTimer tambйm mais nгo desativa a anim. |
if (strcmp(cmd, "/debugalta", true) == 0)
{
if (IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /debugalta [ID/Nome]");
return true;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if (IsPlayerConnected(giveplayerid))
{
if (PlayerInfo[playerid][pAdminStats] != 0 && PlayerInfo[playerid][pAdmin] <= 5)
{
SendClientMessage(playerid, COLOR_GRAD1,"ERRO: Vocк nгo estб no modo admin! (/trabalhar)");
return true;
}
if (Hospital[giveplayerid] != 0)
{
SendClientMessage(playerid, COLOR_GRAD1,"ERRO: O personagem estб em coma.");
return true;
}
ClearAnimations(giveplayerid);
TogglePlayerControllable(giveplayerid, 1);
KillTimer(animacao_forcada3[giveplayerid]);
}
return true;
}
}
return true;
}
KillTimer(animacao_forcada3[giveplayerid]); ClearAnimations(giveplayerid); TogglePlayerControllable(giveplayerid, 1);