Author Topic: Godmode - Script  (Read 5006 times)

0 Members and 1 Guest are viewing this topic.

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
Godmode - Script
« on: September 24, 2016, 11:21:38 am »
By: Dominik
Script Core: III
Test on: 2.8.1 (on >2.8.1 work hurtpolygon good mode)
Download: see down attach.
Commands:
Code: [Select]
/god - enabled or disabled your god mode
/god <1-32>  enabled or disabled for player godmode
Code:
Code: [Select]
unit GodMode;

interface

implementation
const
Color=$DABC20;
var
Decl: byte;
GoodMode: array[1..32] of Boolean;

procedure AutoDisabled(Player: TActivePlayer; Kicked: Boolean);
begin
if (GoodMode[Player.ID]) then Player.WriteConsole('Your godmode has been disabled!',Color);
GoodMode[Player.ID] := false;
end;

function Commands(Player: TActivePlayer; Text: string): Boolean;
var id:byte;
begin
Result:=false;
if (Player.IsAdmin) then begin
if ExecRegExpr('/god [0-9]{1,2}$',lowercase(Text)) then begin
id := 0; try delete(Text,1,5); id := strtoint(Text); except end;
if (id>0) then begin
if (id<33) then begin
if (Players[id].Active) then begin
if (GoodMode[id]=false) then begin
GoodMode[id]:=true;
if (Player.ID=ID) then Player.WriteConsole('Godmode is enabled!',Color) else
begin
Player.WriteConsole('Godmode for '+Players[ID].Name+' enabled!',Color);
Players[id].WriteConsole(Player.Name+' give for you godmode!',Color);
end;
end else
begin
GoodMode[id]:=false;
if (Player.ID=ID) then Player.WriteConsole('Godmode is disabled!',Color) else
begin
Player.WriteConsole('Godmode for '+Players[ID].Name+' disabled!',Color);
Players[id].WriteConsole(Player.Name+' disabled your godmode!',Color);
end;
end;
end else Player.WriteConsole('Not found a player with the ID. ('+inttostr(id)+')',Color);
end else Player.WriteConsole('ID must be smaller than '+inttostr(id)+'. (max 32)',Color);
end else Player.WriteConsole('ID must be bigger than 0.',Color);
end;
if (lowercase(Text)='/god') then begin
if (GoodMode[Player.ID]=false) then begin
GoodMode[Player.ID]:=true;
Player.WriteConsole('Godmode is enabled.',Color);
end else
begin
GoodMode[Player.ID]:=false;
Player.WriteConsole('Godmode is disabled.',Color);
end;
end;
end;
end;

function NoDamage(Shooter, Victim: TActivePlayer; Damage: Single; BulletId: Byte): Single;
begin
if (GoodMode[Victim.ID]=true) then Result := 0 else Result := damage;
end;

initialization
begin
Game.OnLeave := @AutoDisabled;
for Decl := 1 to 32 do begin
Players[Decl].OnCommand := @Commands;
Players[Decl].OnDamage := @NoDamage;
GoodMode[Decl]:=false;
end;
end;

finalization;
end.
« Last Edit: September 24, 2016, 11:25:01 am by soldat-game »

Offline Slasher

  • Soldier
  • **
  • Posts: 106
  • Peace
Re: Godmode - Script
« Reply #1 on: September 24, 2016, 12:38:43 pm »
Interesting!  ::)
Make love, not war.

Offline SneS

  • Soldier
  • **
  • Posts: 112
Re: Godmode - Script
« Reply #2 on: September 25, 2016, 01:44:53 am »
Wow nice script  ;D I sent to you a private message!

You know any other options which may use only administrator? e.g predator mode, berserker, more grenades or something?
« Last Edit: September 25, 2016, 02:29:18 am by SneS »

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: Godmode - Script
« Reply #3 on: September 25, 2016, 04:13:28 am »

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
Re: Godmode - Script
« Reply #4 on: September 25, 2016, 07:20:18 am »
Wow nice script  ;D I sent to you a private message!

You know any other options which may use only administrator? e.g predator mode, berserker, more grenades or something?
Send for u :) Yes im have tele mouse (ADMIN DELETE THIS SCRIPT idiots ..  ::)), teleport for players, explode enmy, admin command example /banr <ID> <Time(Min|H|D|Mon)> <Reason>            |
                   - Ban player of id on specified |
                     time (hour, day, months)      |
                     with the stated reason        |
/changewep <id> <newweapon>
aimbot (but admins delete this script from this forum.. using public dll hahahah idiots...)
and other trol player script but admin delete me all fun scripts (They say it was a scam, cheats...)

Offline SneS

  • Soldier
  • **
  • Posts: 112
Re: Godmode - Script
« Reply #5 on: September 25, 2016, 08:40:57 am »
Wow nice script  ;D I sent to you a private message!

You know any other options which may use only administrator? e.g predator mode, berserker, more grenades or something?
Send for u :) Yes im have tele mouse (ADMIN DELETE THIS SCRIPT idiots ..  ::)), teleport for players, explode enmy, admin command example /banr <ID> <Time(Min|H|D|Mon)> <Reason>            |
                   - Ban player of id on specified |
                     time (hour, day, months)      |
                     with the stated reason        |
/changewep <id> <newweapon>
aimbot (but admins delete this script from this forum.. using public dll hahahah idiots...)
and other trol player script but admin delete me all fun scripts (They say it was a scam, cheats...)

Damn! I don't understand why they removed it. It's just a script that runs on your own server... not cheat.