public TOTTimer(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pTod] == 1 && pIstTot[playerid] < 2)
{
pIstTot[playerid]++;
SetTimerEx("TOTTimer", 60000, 0, "i", playerid);
}
else if(PlayerInfo[playerid][pTod] == 1 && pIstTot[playerid] == 2)
{
PlayerInfo[playerid][pTod] = 0;
pIstTot[playerid] = 0;
SetPlayerVirtualWorld(playerid,0);
SendClientMessage(playerid, COLOR_WHITE, "{FFA500}Information{FFFFFF}: Du bist nun aus dem Krankenhaus entlassen!");
SetPlayerSkin(playerid,GetPVarInt(playerid,"tot_Skin"));
TogglePlayerControllable(playerid,1);
SpawnPlayer(playerid);
}
}
return true;
}
und bei OnPlayerDeath
SetTimerEx("TOTTimer", 60000, 1, "i", playerid);
zu
SetTimerEx("TOTTimer", 60000, 0, "i", playerid);