Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: LORD KILLA on December 20, 2008, 12:55:48 pm

Title: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: LORD KILLA on December 20, 2008, 12:55:48 pm
Hey
the whole code is in Code Box [just a little  ;D  ]
I made an easy to use Weapons-Editor:

Script Name: Weapons-Editor
Script Description: let u edit the Weapons.ini IN-GAME !
Original Author(s): [TTD] LORD KILLA
Core Version: 2.6.3
Code:
Code: [Select]
var ini: TINIFile;
  if (GetPiece(Text, ' ',1) = '/editwep') then begin
  iniSetValue(ini, GetPiece (Text,' ',3), GetPiece (Text,' ',4), GetPiece (Text,' ',5));
  iniSave(GetPiece (Text,' ',2), ini); // must call to save changes
  end;

Example:
/editwep weapons.ini Minigun Damge 900
Will set in "Weapons.ini" the "Minigun" settings (Damge) to 900
Title: Re: An easy to use WEAPINS.INI EDITOR !!! IN-GAME !!!
Post by: ~Niko~ on December 21, 2008, 04:44:04 am
amazin' :D  Just fix this typo:

Quote
An easy to use WEAPINS.INI EDITOR !!! IN-GAME !!!
Title: Re: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: LORD KILLA on December 21, 2008, 05:35:25 am
Eh, there nothing....
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Title: Re: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: DorkeyDear on December 21, 2008, 01:41:36 pm
Damge -> Damage
in your example

Title: Re: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: LORD KILLA on December 22, 2008, 11:40:56 am
ye, anyway

I found an error, and, i dont know better ask an moderator to put it to scripting help
the error is awshome

its an easy script, but i cant find the error

[ http://forums.soldat.pl/index.php?topic=22338.new#new - goog ini-functions :) but error]
Title: Re: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: -Major- on December 22, 2008, 02:27:38 pm
doesn't weapons.ini modifications require recompiling?
Title: Re: An easy to use WEAPONS.INI EDITOR !!! IN-GAME !!!
Post by: rayanaga on December 22, 2008, 05:51:35 pm
doesn't weapons.ini modifications require recompiling?

just a /loadwep command will do the trick.