0 Members and 1 Guest are viewing this topic.
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;beginresult := damage;if (damage>0) AND (damage<3000) AND (shooter<>victim) then begin result := damage * (150.0/desiredmaxhealth); end;end;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer;) : Integer; begin result := damage;if (damage>0) AND (damage<3000) AND (shooter<>victim) then begin result := damage * (150.0/desiredmaxhealth); end;end;// desiredmaxhealth,300 : Integer;// desiredmaxhealth: Integer;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : Integer; begin result := damage;if (damage>0) AND (damage<3000) AND (shooter<>victim) then begin result := damage * (150.0/desiredmaxhealth); // THIS LINE CAUSES THE ERROR end;end;
function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : Integer;constdesiredmaxhealth= *THIS BE EDITED TO VALUE YOU WANT*; begin result := damage;if (damage>0) AND (damage<3000) AND (shooter<>victim) then begin result := round(damage * (150.0/desiredmaxhealth)); end;end;
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.
procedure OnAdminMessage(IP, Msg: String);begin if (Msg='/say') then begin procedure WriteLn(Output: String); Output='/say #################'; end;end;
// When the server starts for the first time a bot should be added as a spectator. He will comment the game/////////procedure ActivateServer() begin Command ('/addbot5 Spectator'); end; end;// If a flag is stolen the spectator bot writes the comment below. He has ID #1, because he join OnServerStart /////procedure OnFlagGrab(ID, TeamFlag: byte;GrabbedInBase: boolean)begin procedure BotChat(ID:Byte;Text:string) begin BotChat(1,'Players keeps sake! Flag has been taken!') end; end;end;
procedure OnAdminMessage(IP, Msg: String);begin if Copy(Msg, 1, 4)='/say' then WriteConsole(0, '#################', $FFFF00);end;
var BotID: byte;procedure ActivateServer(); var a: byte; begin a := NameToID('Spectator'); if a > 0 then KickPlayer(a); botID := Command('/addbot5 Spectator'); end;procedure OnFlagGrab(ID, TeamFlag: byte;GrabbedInBase: boolean);begin BotChat(BotID,'Players keeps sake! Flag has been taken!');end;
procedure OnFlagGrab(ID, TeamFlag: byte;GrabbedInBase: boolean)begin procedure BotChat(ID:Byte;Text:string) begin BotChat(1,'Players keeps sake! Flag has been taken!') end; end;end;
procedure ActivateServer(); begin Command ('/addbot5 Spectator'); end; procedure OnFlagReturn(ID, TeamFlag: byte); begin BotChat(1,'Flag returned!'); end;procedure OnFlagDrop(ID, TeamFlag: byte); begin BotChat(1,'Flag got lost!'); end; //procedure OnFlagGrab(ID, TeamFlag: byte;GrabbedInBase: boolean);// if(GrabbedInBase := 1) begin// BotChat(1,'Players keeps sake! Flag has been taken!');// end; //function OnPlayerCommand(ID: Byte; Text: string): boolean; // if (Text:='/kill') OR (Text:= '/brutalkill') then begin// BotChat(1,'Don´t you dare to suicide again!')// Command('/kill ' + ID); //procedure OnFlagScore(ID, TeamFlag: byte);// begin// BotChat(1,'One score, one point!'); // end;
procedure OnFlagGrab(ID, TeamFlag: byte; GrabbedInBase: boolean);begin if GrabbedInBase then BotChat(1, 'Players keeps sake! Flag has been taken!');end;
procedure BooleanTest;var Bool: boolean;begin Bool := true; // Set to false an it'll output 2 times "Bool is false" if Bool then WriteLn('Bool is true!'); if not Bool then WriteLn('Bool is false!'); if Bool = false then WriteLn('Bool is false!'); if Bool = true then WriteLn('Bool is true!');end;
WriteLn('Bool is ' + iif(Bool,'true','false') + '!');
if(GrabbedInBase := 1) begin
if(GrabbedInBase = 1) begin
procedure OnJoinGame(ID,Team:Byte);then begin WriteConsole(ID,'Text'); WriteConsole(ID,'Text'); WriteConsole(ID,'Text');end;
procedure OnJoinGame(ID,Team:byte);then begin WriteConsole(ID,'Hello, this server is scripted.'; $FFFFFFFF); WriteConsole(ID,'You can choose out of 4 classes.'; $FFFFFFFF); WriteConsole(ID,'For further information type !help.'; $FFFFFFFF);end;
procedure OnJoinGame(ID,Team:byte);begin procedure WriteConsole(ID:Byte;Text:String;Colour:Longint); then begin WriteConsole(ID,'Hello, this server is scripted.'; $FFFFFFFF); WriteConsole(ID,'You can choose out of 4 classes.'; $FFFFFFFF); WriteConsole(ID,'For further information type !help.'; $FFFFFFFF); end; end;