Jump to content

[GUS]Some problems with !writeini


Convirion

Recommended Posts

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
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
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

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

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
  • 2 weeks later...
  • Recently Browsing   0 members

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