Jump to content

naming of .ini files


[DDC]4:20

Recommended Posts

Ok, so I was trying to make each user their own .ini file.

I was trying to do it like this...

!writeini -n $mta.nick($1,$2).ini blah blah

lol, no it dont work like i wanted it too lol....

it literally names the .ini $mta.nick($1,$2).ini lol

Is what I am trying to accomplish possible?

Link to comment

I just use stuff like:

!writeini -n mytext.ini start $mta.nick($1,$2) yes 

i post a peice of script for you to use:

on *:SIGNAL:mta.command: { 
elseif ($3 == !makeini) { 
$mta.nick($1,$2) $1 $4  
} 
elseif ( $playerini($1,$2) == $null ) && ($readini(playerini.ini,ini,$mta.nick($1,$2)) != yes) 
!writeini -n %b.ini start $mta.nick($1,$2) yes 
mta.pm $1 $2 Your Ini file has been created! 
} 
if ($mta.nick($1,$2) ) { 
mta.pm $1 $2 Error: Your .ini file can not be created because You/Someoneelse has already created an .ini with this name. 
} 
if (!totalini* iswm $3) { 
Total Player ini's Created: $playerini($1,$2) $1 $4 
} 
elseif ($3 == !clearini) { 
elseif ($mta.nick($1,$2) > 3 ) { 
elseif ( $playerini($1,$2) == $remove ) && ($deleteini(playerini.ini,words,remove) != yes) 
} 
 } 

Although i havnt Tested this, i hope it works, because im not that good at scripting myself, but i have a go :P

Hope this is useful for you :D

Link to comment

^^^^ are you serious?

O.k. so certain characters cannot be used in filenames. But,,,.

What if I made my server so you couldn't use such characters in your nick?,,,,

Is there a way for me to make a .ini file with a players nick as the filename?

I tried setting a variable and using that too but no go,,

whatever i put infront of .ini in the script is exactly what the .ini filename is...

here is example...

  
on *:SIGNAL:mta.join: { 
  if ($mta.nick($1,$2) != $null) { 
    !writeini -n sweetmaryjane\$mta.nick($1,$2).ini  PLAYER~STATS -VISITS- $iif($readini(sweetmaryjane\$mta.nick($1,$2).ini,PLAYER~STATS,-VISITS-),$calc($v1 + 1),1) 
  } 
} 
  

So, with the understanding that those characters cannot be used in filenames,,, Is it possible to to this in some way?

Link to comment

Oh Toady,,, that is fkn perfect man.

I dont know what else to say but thanks man...

I know it is not a good method because of limitations,,,

but when i want to do something,,, i want to do it hehe...

It's a learning thing,,,, can it be done... hehe,, I'm sure you understand..

Anyways,, all credit to Toady! Super scripter hehe!

Thanks again man!

Link to comment
  • Recently Browsing   0 members

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