0 Members and 1 Guest are viewing this topic.
procedure OnPlayerShoot(Shooter, Bulletstyle: byte);procedure OnTick(Ticks: integer);
OnKnifeThrow(If you dont want knife throwing in your server you KillObjects (kill the knife in air))
Swompie slaps Gizd with a huge Scripting ManualStyle #25..
also recommend that GetPlayerStat to have a vest value.
Quote from: Swompie on April 15, 2010, 02:10:47 pmSwompie slaps Gizd with a huge Scripting ManualStyle #25..the knife is a bullet until it collides with something. Then it becomes an object (hence it can't deal damage any more and you can pick it up)On a side note, this thread is turning into a mess of a discussion already <.< Not good
pow() or power() function, at the moment you have to do stupid loops.
Anyone else than me wants plain bullets spawned through CreateBullet() visible to anyone no matter which weapon he carries?
DoDamage should return the bulletstyle.
Do you mean OnPlayerDamage? Because DoDamage is a procedure, and even if it was a function, anything it returns (besides maybe how much of the player's health was lost?) would be useless.
Function OnHit(ID,Bullet:Byte):Boolean; // ID: Player being hit, Bullet: ID of the bulletbegin Result := false; // set to true to cancel hit registrationend;
Function OnPolygonTouch(ID,Type:Byte):Boolean; // ID: Player who touches a polygonbegin // Type: Polygon type Result := false; // set to true if he shall fall throughend;
There will be no procedure which triggers whenever a player shoots. There will be no event which triggers each tick or millisecond.
OnHit wouldn't trigger whenever someone shoots. It'll trigger whenever a player is being hit :3
Quote from: DarkCrusade on June 12, 2010, 01:14:24 pmOnHit wouldn't trigger whenever someone shoots. It'll trigger whenever a player is being hit :3That won't change frequency a lot.
Quote from: Gizd on June 13, 2010, 03:28:05 amQuote from: DarkCrusade on June 12, 2010, 01:14:24 pmOnHit wouldn't trigger whenever someone shoots. It'll trigger whenever a player is being hit :3That won't change frequency a lot.How 'bout OnPlayerDamage.And still it wouldn't be possible to negate the insta-kill explosives, because it still had to be removed the hardcoded part..
GetPlayerStat(ID,'Programmes'); // Returns the amount of programs running behind SoldatGetPlayerStat(ID,'TimeConnected'); // Returns the time (in seconds) a player is connected
First: Just some random idea that came up to me when I worked on AntiCheat :3
Second: Coders are lazy, man
wtf is programmes.. why would you need it? And you can calculate timeconnected with two lines of code <.<
GiveBonus(ID,0); // Ends all timed bonuses (berserker,predator,flamegod)GiveBonus(ID,BonusID,Time); // Time = any integer value (in seconds)
Function CreateGUI(ID,Transparency:Byte; XPosition,YPosition,ScaleX,ScaleY:Single; Title:String; Colour:LongInt): Byte; // Returns the ID of the GUI, position and scale should be understandableFunction TextField(GUIID:Byte; XPosition,YPosition:Single; Title:String; Colour:LongInt): Byte; // Creates a textfield, the player is able to write somethingFunction CreateButton(GUIID:Byte; XPosition,YPosition,XScale,YScale:Single; Title:String; Colour:LongInt): Byte; // Creates a button, that players are able to pressProcedure OnPressButton(ID,ButtonID:Byte); // Triggers whenever a player hits a buttonProcedure OnTextInput(ID:Byte; Input:String); // Triggers whenever a player uses a text field
^|If you do getplayerstat(ID,'team') in OnJoinTeam it will return the previous team.
some particle support would be good (like jets and sparks)procedure createParticles(r;g;b; speed; direction; speedRange=0; directionRange=0, amount=1);this way we don't need to use explosions to make a sign
I think particles would be too heavy for soldat, and cause alot of lag and other problems.
would make scripting much more exciting
procedure RaiseLastException;procedure RaiseException(Ex: TIFException; Param: string);function ExceptionType: TIFException;function ExceptionParam: string;function ExceptionProc: Cardinal;function ExceptionPos: Cardinal;function ExceptionToString(er: TIFException; Param: string): string;
Having the OnGameEnd event return a string for the new map. This will allow custom map lists that are dynamic based on whatever the script would like.function OnGameEnd(): string;
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.
procedure OnPlayerSpeak(ID: Byte; Text: string);var MedTaunt, BomTaunt:string;begin MedTaunt := ReadFile('taunts\MedicTaunt.txt'); BomTaunt := ReadFile('taunts\BomberTaunt.txt'); if (Text = '!medic') then begin SetTaunt(ID, MedTaunt); WriteConsole(ID, 'You are now a MEDIC. Press Alt+W to heal teammate.', $A00000); end else if (Text = '!bomb') then begin SetTaunt(ID, BomTaunt); WriteConsole(ID, 'You are now a BOMBER. Press Alt+W to place mine.', $A00000); end;end;
procedure AppOnIdle(Ticks: integer);begin if timeleft = 180 then begin ServerModifier('Temperature',SandStorm); WriteConsole(0,'Incoming sand storm !',$EE81FAA1);end; end;
Procedure ServerModifier('Weather', Value:Byte);
I am working on a Pokemon script for Soldat: no weather, 1: rain, 2: sandstorm, 3: snow[/i]
Function GetGostekStat(ID,'Stat'):Variant;Chain: Dogtags: ByteHat: Hatstyle: ByteHair1: Hairstyle: ByteHair2: Colour of the hair: Longint Face: Colour of the face: LongintBody: Colour of the body: LongintLegs: Colour of the legs: Longint
Nice suggestion !
* FalconPL revives the dead topicIf soldat will be ever developed, please add something like "Dummy=true/false" to .bot files, so i don't have to name bot "Dummy" to make it not moving/shooting/interacting