Author Topic: .ini file writing  (Read 2859 times)

0 Members and 1 Guest are viewing this topic.

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
.ini file writing
« on: August 05, 2008, 06:06:08 pm »
Hello doe anybody know how can i write ini file from ingame?

My Code:
Quote
    elseif (($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?

szostol

  • Guest
Re: .ini file writing
« Reply #1 on: August 05, 2008, 06:35:41 pm »
!writeini -n vcmp.cars.ini OWNERS $3 $4-

Example:

!changeowner 70 [SRS]Tamas

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: .ini file writing
« Reply #2 on: August 05, 2008, 10:21:36 pm »
Thanks!