0 Members and 1 Guest are viewing this topic.
procedure OnAdminConnect(IP: string);beginend;procedure OnAdminDisconnect(IP: string);beginend;procedure OnAdminMessage(IP, Msg: string);beginend;
varspawn_stat: array[1..16] of byte;//Variable array for player spawned stationary gunsmana: array[1..16] of byte;//Variable array for player mana levelfunction OnRequestGame(IP: string; State: integer): integer;begin Result := State;end;procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: byte);beginend;procedure OnJoinGame(ID, Team: byte);begin if(IDToName(ID)='Major') then begin Command('/say Hasta la Vista Major!'); Command('/kicklast'); //Autokick Majors end; if(IDToName(ID)='Cpl. Gradius') then begin Command('/admip '+IntToStr(ID)); //If I join we want to make me an admin obviously end;end;procedure OnJoinTeam(ID, Team: byte);begin mana[ID] := 0; //When someone joins, reset their mana to zeroend;procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);begin mana[ID] := 0; //Honestly it's not needed to to the reset on the join team command, but what the hellend;procedure OnFlagGrab(ID, TeamFlag: byte; GrabbedInBase: boolean);beginend;procedure OnFlagReturn(ID, TeamFlag: byte);beginend;procedure OnFlagScore(ID, TeamFlag: byte);beginend;procedure OnMapChange(NewMap: string);beginend;procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);begin mana[killer] := mana[killer] + 1;end;function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;begin // Victim = Player Damaged // Shooter = Player doing the damage result := Damage;end;procedure OnPlayerRespawn(ID: byte);beginend;procedure OnPlayerSpeak(ID: byte; Text: string);begin if(Text='/help mana') then begin SayToPlayer(ID,'You gain 1 Mana point per kill etc.'); SayToPlayer(ID,'Mana is used for casting spells!'); end; if(Text='/help heal') then begin SayToPlayer(ID,'"/heal" (5 Mana to use)'); SayToPlayer(ID,'"Heal you completely!'); end; if(Text='/help spawn stat') then begin SayToPlayer(ID,'"/spawn stat" (10 Mana to use)'); SayToPlayer(ID,'Spawn a stat-gun by you for a few seconds!'); end; if(Text='/help spawn flamer') then begin SayToPlayer(ID,'"/spawn flamer" (10 Mana to use)'); SayToPlayer(ID,'Spawn a Flamer-Guard next to you!'); end; if((Text='/heal')and(mana[ID] >= 5)) then begin DoDamage(ID,-200); mana[ID] := mana[ID] - 5; end; if((Text='/heal')and(mana[ID] < 5)) then begin SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/5!'); end; if((Text='/spawn stat')and(mana[ID] >= 10)) then begin spawn_stat [ID]:= SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15); mana[ID] := mana[ID] - 10; SayToPlayer(ID,'You spawned a stat gun!'); sleep(1000); KillObject(spawn_stat[ID]); SayToPlayer(ID,'Your stat gun disintergrated!'); end; if((Text='/spawn stat')and(mana[ID] < 10)) then begin SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/10!'); end; if((Text='/spawn flamer')and(mana[ID] >= 10)) then begin SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),18); mana[ID] := mana[ID] - 10; SayToPlayer(ID,'You spawned a Flamer Guard!'); end; if((Text='/spawn flamer')and(mana[ID] < 10)) then begin SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/10!'); end;end;
{$VERSION 2.6.0}const//Teams ALPHA = 1; BRAVO = 2; CHARLIE = 3; DELTA = 4; SPECTATOR = 5;//Game Modes DEATHMATCH = 0; POINTMATCH = 1; TEAMMATCH = 2; CTF = 3; RAMBO = 4; INF = 5; HTF = 6;//Weapons DEAGLES = 1; HKMP5 = 2; AK74 = 3; STEYR = 4; SPAS = 5; RUGER = 6; M79 = 7; BARRET = 8; MINIMI = 9; MINIGUN = 10; FLAMER = 11; BOW = 12; FLAMEBOW = 13; SOCOM = 0; KNIFE = 14; CHAINSAW = 15; LAW = 16;procedure ActivateServer();beginend;procedure AppOnIdle(Ticks: integer);beginend;function OnCommand(ID: Byte; Text: string): boolean;begin //NOTE: This function will be called when an admin types a / command. Result := false; // Return true if you want to ignore the command typed.end;function OnPlayerCommand(ID: Byte; Text: string): boolean;begin //NOTE: This function will be called when [_ANY_] player types a / command. Result := false; //Return true if you want disable the command typed.end;procedure OnException(ErrorMessage: string);begin WriteFile('ErrorLog.txt',ErrorMessage); // Dump the error to text file.end;