Convirion Posted February 17, 2007 Share Posted February 17, 2007 hi, i'm trying to make a script like this: each time someone joins it does: players+1 so if player 1 joins it does 0+1 and if player 2 joins it does 1 +2 hope you guys understant what i mean. so how can i make it this way: !writeini -n " $+ $scriptdir $+ players.ini" PLAYERS players +1 thanks for looking at it. Link to comment
BetaDevil Posted February 17, 2007 Share Posted February 17, 2007 hi, i'm trying to make a script like this: each time someone joins it does:players+1 so if player 1 joins it does 0+1 and if player 2 joins it does 1 +2 hope you guys understant what i mean. so how can i make it this way: !writeini -n " $+ $scriptdir $+ players.ini" PLAYERS players +1 thanks for looking at it. do it like this:!writeini -n " $+ $scriptdir $+ players.ini" PLAYERS $calc(players+1) or this !writeini -n " $+ $scriptdir $+ players.ini" PLAYERS $gus.add(players,1) Link to comment
lil Toady Posted February 17, 2007 Share Posted February 17, 2007 do it like this:!writeini -n " $+ $scriptdir $+ players.ini" PLAYERS $calc(players+1) or this !writeini -n " $+ $scriptdir $+ players.ini" PLAYERS $gus.add(players,1) none of those will work do it like this: on *:SIGNAL:mta.join:{ !writeini -n " $+ $scriptdir $+ players.ini" PLAYERS $mta.nick($1,$2) $calc($readini($scriptdir $+ players.ini,PLAYERS,$mta.nick($1,$2)) + 1) } Link to comment
Convirion Posted February 25, 2007 Author Share Posted February 25, 2007 I have now something like this: if ($mta.server($1).players > $readini($scriptdir $+ recordplayers.ini,PLAYERS,players)) { mta.text $1 We have a new record! !writeini -n " $+ $scriptdir $+ recordplayers.ini" PLAYERS players $calc(players+1) } I want something like this: if the record is 20 players and there are 20 players in the server and someone joins the server so the record becomes 21 it need to show "We have a new record!" and it need to write to the file so in the file players=21 Hope someone can help me out Link to comment
lil Toady Posted February 25, 2007 Share Posted February 25, 2007 bleh, from my previous post you still didnt get how it works? if ($mta.server($1).players > $readini($scriptdir $+ recordplayers.ini,PLAYERS,players)) { mta.text $1 We have a new record! !writeini -n " $+ $scriptdir $+ recordplayers.ini" PLAYERS players $mta.server($1).players } Link to comment
Convirion Posted February 26, 2007 Author Share Posted February 26, 2007 Thank you lil toady, i didn't get it worked with if for some reason... Link to comment
HouseMD Posted March 7, 2007 Share Posted March 7, 2007 how can u add 1 to eg 0 with !writeini because i tried all the ways here and it didn't work... Link to comment
damnet007 Posted March 7, 2007 Share Posted March 7, 2007 !writeini -n " $+ $scriptdir $+ bla.ini" bla bla $calc($readini(bla.ini,bla,bla) + 1) Link to comment
lil Toady Posted March 7, 2007 Share Posted March 7, 2007 !writeini -n " $+ $scriptdir $+ bla.ini" bla bla $calc($readini(bla.ini,bla,bla) + 1) !writeini " $+ $scriptdir $+ bla.ini" bla bla $calc($readini($scriptdir $+ bla.ini,bla,bla) + 1) Link to comment
Recommended Posts