10.07.2011, 04:10
No topo do GM:
O Comando:
No Final do GM:
PHP код:
forward TempoMorte(playerid);
new IniciarContagem[MAX_PLAYERS];
new PararContagem[MAX_PLAYERS];
PHP код:
if(strcmp(cmd, "/killme", true)==0)
{
new Float:Vida;
GetPlayerHealth(playerid,Vida);
if(Vida < 90)
{
SendClientMessage(playerid, COR_CINZA1, " Vocк sу pode se matar se estiver com 90 de vida ou mais!");
return 0x01;
}
IniciarContagem[playerid] = 3;
PararContagem[playerid] = SetTimerEx("TempoMorte",1000,true,"i",playerid);
return 0x01;
}
PHP код:
public TempoMorte(playerid)
{
IniciarContagem[playerid]--;
format(String,sizeof(String),"Vocк morrera em %i",IniciarContagem[playerid]);
SendClientMessage(playerid,-1,String);
if (IniciarContagem[playerid] == 0)
{
GameTextForPlayer(playerid, "~r~ voce morreu kkk", 5000, 5);
SetPlayerHealth(playerid, 0);
KillTimer(PararContagem[playerid]);
}
}