Jump to content

I need some help with this script


SanZoR

Recommended Posts

This script wont works:

alias mta.end { 
  if ($readini(playersalive.ini)) == 1) { 
    var %a = 0 
     while (%a < $mta.server($1).cmax) { 
      if (!$mta.dead($1,%a)) { 
       if (!$mta.nick($1,%a)) { 
       mta.text $1 $mta.nick($1,%a) is winner, and gets one more win and 10$ money! 
       !.timer 1 5 mta.freeze $1 %a 
       !writeini -n money.ini MONEY $mta.nick($1,%a) $calc($readini(money.ini,MONEY,$mta.nick($1,%a)) + 10) 
       !writeini -n wins.ini WINS $mta.nick($1,%a) $calc($readini(wins.ini,WINS,$mta.nick($1,%a)) + 1) 
       !.remove playersalive.ini 
       !halt 
       } 
      } 
     !inc %a 
   } 
  } 
 } 
} 
on *:SIGNAL:mta.connect: { 
  mta.text $1 Deathmatch script connected! 
} 
on *:SIGNAL:mtaplus.startrace: { 
   mta.text $1 DD script started! 
  !writeini playersalive.ini $mta.server($1).players 
} 
on *:SIGNAL:mta.part: { 
if (!$mta.dead($1,$2)) !writeini playersalive.ini $calc($readini(playersalive.ini) - 1) 
  mta.end $1 $2 
} 
on *:SIGNAL:mta.death: { 
  !writeini playersalive.ini $calc($readini(playersalive.ini) - 1) 
  mta.end $1 $2 
} 

Thanks in advance :)

Link to comment
This script wont works:

alias mta.end { 
  if ($readini(playersalive.ini)) == 1) { 
    var %a = 0 
     while (%a < $mta.server($1).cmax) { 
      if (!$mta.dead($1,%a)) { 
       if (!$mta.nick($1,%a)) { 
       mta.text $1 $mta.nick($1,%a) is winner, and gets one more win and 10$ money! 
       !.timer 1 5 mta.freeze $1 %a 
       !writeini -n money.ini MONEY $mta.nick($1,%a) $calc($readini(money.ini,MONEY,$mta.nick($1,%a)) + 10) 
       !writeini -n wins.ini WINS $mta.nick($1,%a) $calc($readini(wins.ini,WINS,$mta.nick($1,%a)) + 1) 
       !.remove playersalive.ini 
       !halt 
       } 
      } 
     !inc %a 
   } 
  } 
 } 
} 
on *:SIGNAL:mta.connect: { 
  mta.text $1 Deathmatch script connected! 
} 
on *:SIGNAL:mtaplus.startrace: { 
   mta.text $1 DD script started! 
  !writeini playersalive.ini $mta.server($1).players 
} 
on *:SIGNAL:mta.part: { 
if (!$mta.dead($1,$2)) !writeini playersalive.ini $calc($readini(playersalive.ini) - 1) 
  mta.end $1 $2 
} 
on *:SIGNAL:mta.death: { 
  !writeini playersalive.ini $calc($readini(playersalive.ini) - 1) 
  mta.end $1 $2 
} 

Thanks in advance :)

Is there anyone who can...?

Link to comment

Why the hell do you quote the script once again????? I'm starting to hate you already! :evil: I'm in a hurry, you are writing ini's wrong in some places, you specify the key but not the value.

And was it you doing that HSH or SHS script? C'mon you can't script. The functions you specified in your post there can be done a few days. You can't finish it for few months already

Link to comment
Why the hell do you quote the script once again????? I'm starting to hate you already! :evil: I'm in a hurry, you are writing ini's wrong in some places, you specify the key but not the value.

And was it you doing that HSH or SHS script? C'mon you can't script. The functions you specified in your post there can be done a few days. You can't finish it for few months already

Toady, its actually House's fault, he has been unactive few weeks, so we couldnt finish that yet. So... When i next time see him, we will done our job.

Link to comment
  • 5 weeks later...

lil you got some brackets wrong lol and its messed up try this out :)

on *:SIGNAL:mta.connect: {

mta.text $1 Deathmatch script connected!

set %maxplayers $mta.server($1).cmax

set %players $mta.server($1).players

}

on *:SIGNAL:mta.command: {

var %a = $iif((!$4),$2,$iif(($mta.getid($1,$4) == $null),$2,$v1))

if ($3 == !dmpoints) mta.text $1 $mta.nick($1,%a) $+ 's Points: $readini(dm.ini,points,$mta.nick($1,%a))

elseif ($3 == !dmcash) mta.text $1 $mta.nick($1,%a) $+ 's Cash: $ $+ $readini(dm.ini,cash,$mta.nick($1,%a))

elseif ($3 == !dmwins) mta.text $1 $mta.nick($1,%a) $+ 's Current Dm Wins: $readini(dm.ini,wins,$mta.nick($1,%a))

}

on *:SIGNAL:mta.part: {

Death.MC $1-

}

on *:SIGNAL:mta.death: {

Death.MC $1-

}

//////////////////////////////

//////// ALIASES ///////////

//////////////////////////////

alias winner.cash $iif($readini(dm.ini,cash,$mta.nick($1,%a)) == $null,0,$v1)

alias winner.points $iif($readini(dm.ini,points,$mta.nick($1,%a)) == $null,0,$v1)

alias dm.wins $iif($readini(dm.ini,wins,$mta.nick($1,%a)) == $null,0,$v1)

alias Death {

var %a = 0,%b = 0,%c

while (%a <= %maxplayers) {

if ($mta.dead($1,%a) == $null) && ($mta.nick($1,%a) != $null) {

inc %b

%c = %a

}

!inc %a

}

if (%b == 1) !return %c

}

alias Death.MC {

var %a = $death($1)

if (%a != $null) {

!writeini -n dm.ini cash $mta.nick($1,$2) $calc($winner.cash($1) + 10)

!writeini -n dm.ini wins $mta.nick($1,$2) $calc($dm.wins($1) + %players)

!writeini -n dm.ini points $mta.nick($1,$2) $calc($winner.points($1) + %players)

mta.text $1 The Winner Is $mta.nick($1,%a) And Gets $ $+ 10 Cash And %b Points %players

}

}

Link to comment

stuff you then you just wont accept help

and i have only just joined the forum and you annoying me already coming out with some sarky comment before when i posted about dm script and i mean you cant ever write ini's right or read them so there no point in trying

hows that from prs ? i have had help with bits of my script from scooby ? but none of its copied exactly

Link to comment
  • Recently Browsing   0 members

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