Jump to content

How to write inis


SamB

Recommended Posts

How do u make scripts write inis?

on *:SIGNAL:mta.command: { 
 if ($3 == !baggage) { 
  mta.text $1 $writeini $vehicle.ini == $mta.nick($1,$2)=Baggage
 } 
}

If someone could correct it for me, tell me were i went wrong, etc. that would be nice

Link to comment

Yes, thats exactly what Oli's script is doing. If you expect it to do sometihng else, please explain what you expect in the ini

Furthermore: /help /writeini

/writeini -n

Writes to files in the standard INI file format.

If the -n switch is specified, mIRC will attempt to write to the .ini file even if it is larger than 64k.

A part of the mirc.ini file looks like this:

[DDE]

ServerStatus=on

ServiceName=mirc

You could achieve this with /writeini by using:

/writeini my.ini DDE ServerStatus on

/writeini my.ini DDE ServiceName mirc

You can delete whole sections or items by using the /remini command.

Warning: Do not use this command to modify any of the INI files currently being used by mIRC.

Link to comment

i think your trying to make

on *:SIGNAL:mta.command: {
 if ($3 == !car) {
   !writeini -n " $+ $scriptdir $+ vehicle.ini" VEHICLE $mta.nick($1,$2) Baggage
 }
}

this at least would result in a file called vehicle.ini

with this info if you use the command

[Vehicle]
SamB=Baggage

BUT .. afaik its not possible in SA script currently to read which car a player is in ...

anyway ..just to write a ini file in general ..

psuedocode

   !writeini 

Link to comment

im not trying to make it show what car ur in :P

i just want it to do as i said

SamB: !baggage

(ini file)

[Vehicle]

SamB=Baggage

:) And i dont want any fancy stuff like !$Something($1$2)

SamB=$Something($1$2)

i just want it to do as i said without anything else in the entire world

then i can worry about it reading it :P

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...