Detaljan opis problema:Znaci nasao sam na internetu deathsystem i sada sam isao napraviti da admin moze revive. System je kada igraca netko ubije on se stvori na istom mjestu i lezi dole tako da hitna ga moze izljeciti radi Rp-a a ako nema igraca iz hitne da ga izljeci ima cmd acceptdeath i onda ide na afterlife i poslje tog tajmera stvori se ispred bolnice.E sada imam problem neznam kako da zaustavim AutoDeath timer koji imam.
Dio skripte:
COMANDA
YCMD:arevive(playerid,params[])
{
if(PlayerInfo > 3)
{
new string, target, reason;
if(sscanf(params, "us", target,reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /revive ");
if(IsPlayerConnected(target))
{
format(string, sizeof(string), "Admin %s has revive player %s.: %s",PlayerName(playerid), PlayerName(target),reason);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
format(string, sizeof(string), "AdmWarning: %s has revive player %s.: %s", PlayerName(playerid), PlayerName(target),reason);
AMessage(COLOR_LIGHTRED, string);
ClearAnimations(target);
SecsToGo = 0;
KillTimer(AUTODEATH_SECONDS);
SetPlayerHealth(target, 100);
SetCameraBehindPlayer(playerid);
TogglePlayerControllable(playerid,1);
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "That player is not injured!");
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
}
return 1;
}public AutoDeath(playerid)
{
if (IsDead == 0) { return 0; }
else if (IsDead == 1)
{
new saystring, deathstring, name;
GetPlayerName(playerid,name,sizeof(name));
switch (random(2))
{
case 0:
{
format(saystring,sizeof(saystring),"%s mumbles: I can't hold more..", name);
format(deathstring,sizeof(deathstring),"* %s closes his eyes, falling into death.", name);
}
case 1:
{
format(saystring,sizeof(saystring),"%s mumbles: Aghh.. It's cold.. I feel something.. A light-..",name);
format(deathstring,sizeof(deathstring),"* %s is now inmobilized, and dead.",name);
}
}
ProxDetector(30, playerid, deathstring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ProxDetector(10, playerid, saystring, COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
IsDead = 0;
SecsToGo = AFTERLIFE_SECONDS;
SendClientMessage(playerid,0x00D2E1FF,"------------------ Health Advise -----------------");
SendClientMessage(playerid,COLOR_WHITE,"You are now in the afterlife. You may rest in peace.");
SendClientMessage(playerid,COLOR_WHITE,"When you revive, you will lost memory of last 30 minutes.");
SendClientMessage(playerid,COLOR_WHITE,"If you were non-RPly killed, report the player at the forums.");
SendClientMessage(playerid,0x00D2E1FF,"--------------------------------------------------------");
SetPlayerPos(playerid,0, 0, 0);
SetPlayerCameraPos(playerid,DeathPosX,DeathPosY,DeathPosZ);
SetPlayerCameraLookAt(playerid,DeathPosX,DeathPosY,DeathPosZ+100);
AfterLifeTimer = SetTimerEx("AfterLife",1000,true,"i",playerid);
return 1;
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):///
