0 Members and 1 Guest are viewing this topic.
// Core.pas under the const:Type Player = Record Admin : Integer; God : Integer; End;Var iPlayer : Array[1..32] Of Player;function OnPlayerCommand(ID: Byte; Text: string): boolean;begin //NOTE: This function will be called when [_any_] player types a / command. Case Text Of '/adminlog '+ReadINI('soldat.ini','NETWORK','Admin_Password','...') : Begin iPlayer[ID].Admin := 1; End; End; If iPlayer[ID].Admin = 1 Then Begin Case Text Of '/god' : Begin If iPlayer[ID].God = 1 Then Begin iPlayer[ID].God := 0; WriteConsole(ID, 'Godmode turned off </3',$EE2774CF); End Else Begin iPlayer[ID].God := 1; // Enable if you want to spam it globally // WriteConsole(0, IDToName(ID)+' is now GODLIKE!', $EEFF0000); WriteConsole(ID, 'Godmode turned on <3',$EE2774CF); End; End; End; End; Result := false; //Return true if you want disable the command typed.end;// NetworkCore.pasfunction OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin If iPlayer[Victim].God = 1 Then Begin result := -999999; // Set it to this so NOTHING can ever kill you. If you set it to 0 // you still get killed by direct explosion hits. End Else Begin result := Damage; End;end;
it does not work. I download 140, sever 260, arsse. I copy to 140 folder server, and to scripts folder copy the god script in god.pas. Starting the server, arsse, add me to admins, join, type /god. And I was killed by enemy