Ich habe Problehme bie KillTimer
wie geht das genau ich habe das hier
KillTimer(godmode(playerid));
und noch mehr informationen......
Das ganze soll den timer godmode stoppen
forward godmode(playerid);
public godmode (playerid)
{
SetVehicleHealth(GetPlayerVehicleID(playerid), 999999999.0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/autoheal on", cmdtext, true, 10) == 0)
{
SetTimer("godmode", 1000,true);
SetVehicleHealth(GetPlayerVehicleID(playerid), 999999999.0);
return 1;
}
if (strcmp("/autoheal off", cmdtext, true, 10) == 0)
{
KillTimer(godmode(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000.0);
return 1;
}