Jump to content

MTA:SA Public Release Script - PRS:1.3 Out Now!


Scooby

Recommended Posts

  • Replies 644
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

Yes it is

There stand in the !kick line (dont know where)

if ($prs.level($1,$2) > $prs.level($1,%a) {

When you make from it

if ($prs.level($1,$2) >= $prs.level($1,%a) {

it must work

You can edit this in all command like freeze kick mute ban unmute unfreeze

But then you need to edit that rule from prs.level

Link to comment
is it a possible to add command like this: !end - which ends currend race, and makes all things like at real finish of any player. I mean, it's not !new command to start randomly, but to end race and show the mta screen with selection od next races to being nominate.

:idea::?:

Is not possible

Link to comment
Scooby can you tell me the explantation of the !top command i dont fully understand, What it does and how it works?

ok in short,

when u do !top , 'bla' is sent to the alias as $4 (im sure u know this :) )

then the $findtok line checks which it is finding the 'top' of to make sure it exists.

if it does,

it then sets %1 %2 %3 and %x %y %z as variables, these are gonna be ranks 1 2 3 and the names that go with the ranks.

then the loop starts...

then theres a bunch of lines which define %b on each cycle of the loop - this is what ur finding the top3 of

then theres a few lines that check if %b is better than the current %1 %2 or %3,

and if so, puts it in the relative place, then moves the previous stored data to the rank below.

finally once the loop is complete, it displays the data.

not really sure if this helps u, if u want, i could cut loads out and show u it as a basic version,

it just looks a little more complex as it is coz its doing the top 3 of 15 commands.

let me know anyway.

Link to comment

there is an installation part in the txt file 'prs 1.3 details.txt'

if u follow that, changing the info 'mta-prs1.1.mrc' to 'mta-prs1.3.mrc' u should be ok.

or try reading this topic a little, it has been explained a few times.

if ur still stuck after reading this, post back and tell me how far ur up to.

Link to comment

ok to make it easier for me to explain, i will refer to the top 3 as rank 1,2 and 3

i'll try to explain as easily as possible, just ask if u see something u dont understand :)

alias tops { 
  
  ;the line below defines all the variables needed for the loop (set to check through 32 players). 
  var %a = 0, var %b, %loop = 32, %1 = 0, %2 = 0, %3 = 0, %x, %y, %z 
  
  while (%a < %loop) { 
  
    ;the line below is the variable the loop is checking, this could be anything u want to find the top 3 of. 
    %b = $prs.points($1,%a) 
  
    ;next we check if there is a player present in the current ID slot in the loop. 
    if ($mta.nick($1,%a) != $null) { 
  
      ;then we check to see if the players points are more than whats currently stored as rank 1. 
      if (%b > %1) { 
  
        ;if so, the ranks are moved down and a new rank 1 is added. 
        %3 = %2 | %z = %y | %2 = %1 | %1 = %b | %y = %x | %x = $mta.nick($1,%a) 
  
      } 
  
      ;if the players rank wasnt better than rank 1 but is better than rank 2 then, 
      elseif (%b > %2) { 
        ; we dont touch rank 1, but we move rank 2 to rank 3 then add the new rank 2. 
        %3 = %2 | %2 = %b | %z = %y | %y = $mta.nick($1,%a) 
      } 
  
      ;if the players rank wasnt better than rank 1 or 2 but is better than rank 3 then, 
      elseif (%b > %3) { 
  
        ; add a new rank 3 
        %3 = %b | %z = $mta.nick($1,%a) 
      } 
    } 
  
    ; add 1 to the loop and start again on the next ID slot. 
    !inc %a 
  } 
  
  ;when the loop is finished display the results in the chat 
  mta.text $1 1st %x %1 
  if (%y) .timer 1 1 mta.text $1 2nd %y  %2 
  if (%z) .timer 1 2 mta.text $1 3rd %z  %3 
} 
  

Any Questions, just ask and i'll reply asap.

Link to comment
  • 2 weeks later...

your script brings back many memories to me when a used to annoy u on msn to learn how to script then i made my own :D and mine and yours are the only 2 good ones out there avaliable to the public still even tho mta race is dead a think :(

/me good times :)

dont see u online right much now scooby where are u hiding lol

Link to comment
is it possible to make that the script can auto-set the mode of a map? e.g. when there is [DD] oder [DM] in front of the mapname that it sets it automatically as a deathmatch map :)

sure thats pretty easy, under mta.startrace: add this to the top.

if ([DD] isin $mta.race($1) || [DM] isin $mta.race($1)) { 
  !hadd prsstats mode $+ $replace($mta.race($1),$chr(32),$chr(45)) Deathmatch 
} 

Link to comment

alias xiii.use { 
  if ($xiii.item($1,$2) == mapchange) { 
    if ($4 == $null) { 
      mta.pm $1 $2 Syntax error. !use <mapname> 
    } 
    var %a = $+(*,$4-,*)  
    var %b = $mta.races($1,$mta.races($1,%a)) 
    if (!%b) mta.pm $1 $2 Map not found. 
    else { 
      .write -i nextmap.ini %b 
      .write -i nextmapname.ini $mta.nick($1,$2) 
      mta.pm $1 $2 Mapchange used for %b $+ . Upcoming map: $iif($xiii.nextmap,$v1,%b) 
      hdel xiiistats item $+ $mta.nick($1,$2)  
    } 
  } 
} 

When u typ !use xD it says Mapchange used for 6. Upcoming map: 6.

Link to comment

not really sure what ur asking, the alias has a few errors in it, the 'if, elseif,else" is wrong,

also the write lines are wrong, u specify -i but dont give a line number to overwrite.

if its for then nextmap, then really u only need to set a variable. ie: set %nextmap %b

all this stuff is in prs already so im guessing this is for ur own script?

Link to comment
  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...