Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Tamas on August 05, 2008, 05:06:08 PM

Title: .ini file writing
Post by: Tamas on August 05, 2008, 05:06:08 PM
Hello doe anybody know how can i write ini file from ingame?

My Code:
Quoteelseif (($2 == !changecarowner) || ($2 == !cco)) {
     if ($hget(vcmp,loggedin. $+ %id) < 10) { vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command. }
      else {
       !writeini vcmp.cars.ini OWNERS $vcmp.hgetcarid(%id) $vcmp.hgetname(%id)
      }
    }

Now i want to make if Example: i type:
!changecarowner 34=[SRS]Tamas

Than: the script write or repleace the 34=[SRS]Tamas section
Ex: cars.ini containes 34=somebody under [OWNERS] than i type !changecarowner 34=[SRS]Tamas it will repleace the "34=somebody" line in the file.

I dont know that command that put my "writes" to the file.
Maybe:   !writeini vcmp.cars.ini OWNERS $3- ?

Any idea?
Title: Re: .ini file writing
Post by: szostol on August 05, 2008, 05:35:41 PM
!writeini -n vcmp.cars.ini OWNERS $3 $4-

Example:

!changeowner 70 [SRS]Tamas
Title: Re: .ini file writing
Post by: Tamas on August 05, 2008, 09:21:36 PM
Thanks!