0 Members and 1 Guest are viewing this topic.
procedure AfterPlayerRespawn(ID: byte);begin //Code to be executed after a player respawns (basic test was using ForceWeapon procedure)end;procedure RespawnCheckLoop;var i: byte; Alive: array[1..32] of boolean;begin while true do begin for i := 1 to 32 do if GetPlayerStat(i,'Active') = true then begin if (Alive[i] = false) and (GetPlayerStat(i,'Alive') = true) then begin Alive[i] := true; AfterPlayerRespawn(i); end else if (Alive[i] = true) and (GetPlayerStat(i,'Alive') = false) then Alive[i] := false; end else Alive[i] := false; Sleep(1); end;end;procedure ActivateAfterRespawn;begin ThreadFunc([],'RespawnCheckLoop');end;procedure ActivateServer();begin ActivateAfterRespawn;end;
ThreadFunc is buggy, hence why it isnt documented... duh