Jump to content

{_AntiFreak_}

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by {_AntiFreak_}

  1. alias empty !halt $input(Error - Empty $1 Field,douw,MRS - Error!) 
    alias w_n { 
      if (!$dialog(w_n)) { 
        !dialog -md w_n w_n 
      } 
    } 
    dialog w_n { 
      title "[MRS]Mega-RCON-Script by !!TheTruthGER - Messages" 
      size -1 -1 290 57 
      option dbu 
      text "Welcome-Message:", 2, 8 8 48 8 
      text "News:", 3, 8 24 25 8 
      edit "", 4, 56 8 177 10, autovs 
      button "Welcome: On", 5, 248 8 37 12 
      edit "", 6, 56 24 178 10, autovs 
      button "News: On", 7, 248 24 37 12 
      button "Save Changes", 1, 8 40 128 12 
      button "Close", 9, 144 40 141 12, ok cancel 
    } 
    on *:DIALOG:w_n:sclick:*: { 
      if ($did == 1) { 
        if ($did(w_n,5) == Welcome: On) { 
          !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" 
          !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) 
        } 
        else { 
          !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" 
          !write " $+ $scriptdir $+ welcomemsg.txt" Off 
        } 
        if ($did(w_n,7) == News: On) { 
          !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" 
          !write " $+ $scriptdir $+ newsmsg.txt" News: $did(w_n,6) 
        } 
        else { 
          !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" 
          !write " $+ $scriptdir $+ newsmsg.txt" Off 
        } 
        !halt $input(Messages have been saved,dou,Messages have been saved) 
      } 
      elseif ($did == 5) { 
        if ($did(w_n,5) == Welcome: On) { 
          !did -a w_n 5 Welcome: Off 
          !did -ra w_n 4 Off 
        } 
        else { 
          !did -a w_n 5 Welcome: On 
        } 
      } 
      elseif ($did == 7) { 
        if ($did(w_n,7) == News: On) { 
          !did -a w_n 7 News: Off 
          !did -ra w_n 6 Off 
        } 
        else { 
          !did -a w_n 7 News: On 
        } 
      } 
    } 
    on *:DIALOG:w_n:init:*: { 
      if ($read(welcomemsg.txt,1)) !did -ra w_n 4 $v1 
      if ($read(newsmsg.txt,1)) !did -ra w_n 6 $v1 
    } 
    on *:SIGNAL:mta.adcon: { 
      if ($3 == !messages) w_n 
    } 
    

    NOW IT WORKS!!!!! I'm so good^^ :wink::D

  2. now, i made a dialog, but it doesn't really work. The dialog is shown, but the buttons don't work.

    Here, the dialog:

    alias empty !halt $input(Error - Empty $1 Field,douw,MRS - Error!) 
    alias w_n { 
      if (!$dialog(w_n)) { 
        !dialog -md w_n w_n 
      } 
    } 
    on *:start: { 
      mta 
      !dialog -md w_n w_n 
    } 
    dialog w_n { 
      title "[MRS]Mega-RCON-Script by !!TheTruthGER - Messages" 
      size -1 -1 290 57 
      option dbu 
      text "Welcome-Message:", 2, 8 8 48 8 
      text "News:", 3, 8 24 25 8 
      edit "", 4, 56 8 177 10, autovs 
      button "Welcome: On", 5, 248 8 37 12 
      edit "", 6, 56 24 178 10, autovs 
      button "News: On", 7, 248 24 37 12 
      button "Save Changes", 1, 8 40 128 12 
      button "Close", 9, 144 40 141 12, ok cancel 
    } 
    on *:DIALOG:w_n:sclick:*: { 
      if ($did == 1) { 
        if (!did(w_n,4)) && ($did(w_n,5) == Welcome: On) empty Welcome-Message 
        elseif (!$did(w_n,6)) && ($did(w_n,7) == News: On) empty News 
        else { 
          !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" 
          !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) 
          !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" 
          !write " $+ $scriptdir $+ newsmsg.txt" $did(w_n,6) 
          !halt $input(Welcome/News-Msg Saved,dou,Welcome/News-Msg Saved) 
        } 
      } 
      elseif ($did == 5) { 
        if ($did(prs,5) == Welcome: On) { 
          !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" 
          !write " $+ $scriptdir $+ welcomemsg.txt" Off 
          !did -a w_n 5 Welcome: Off 
          !did -a w_n 4 Off 
        } 
        else { 
          !write -dl $+ 1 " $+ $scriptdir $+ welcomemsg.txt" 
          !write " $+ $scriptdir $+ welcomemsg.txt" $did(w_n,4) 
          !did -a w_n 5 Welcome: On 
        } 
      } 
      elseif ($did == 7) { 
        if ($did(prs,7) == News: On) { 
          !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" 
          !write " $+ $scriptdir $+ newsmsg.txt" Off 
          !did -a w_n 7 News: Off 
          !did -a w_n 6 Off 
        } 
        else { 
          !write -dl $+ 1 " $+ $scriptdir $+ newsmsg.txt" 
          !write " $+ $scriptdir $+ newsmsg.txt" $did(w_n,6) 
          !did -a w_n 7 News: On 
        } 
      } 
    } 
    on *:DIALOG:w_n:init:*: { 
      if ($read($scriptdir $+ welcomemsg.txt,1)) !did -ra w_n 4 $v1 
      if ($read($scriptdir $+ newsmsg.txt,1)) !did -ra w_n 6 $v1 
    } 
    on *:SIGNAL:mta.adcon: { 
      if ($3 == !w_n) w_n 
    } 
    

    What is wrong? Can someone help me, please???

  3. MTA:SA Public Release Script - PRS:1.3:

    All maps starting mode is race right?

    how i can change it to deathmatch? So i dont need put !setmode dm for evry new map!

    you are wrong in this thread, go to the thread "Addcons" there you find information about PRS.

    PRS is a Script for MTA:mA (MTA:mIRC-Admin) a Remote-Admin-Console for MTA:SA. You can load Scripts in it, for example if you type !admin, it shows which admins are online and stuff like this...

  4. Hello,

    i want to create a dialog in my script, but i need some help

    For example i take the dialog out of PRS:

    dialog prs { 
      title "MTASA:PRS By [uVA]Scooby" 
      size -1 -1 197 108 
      option dbu 
      tab "PRS Main", 100, -1 -3 198 111 
      text "Welcome Msg:", 1, 5 15 35 8, tab 100 
      edit "Welcome To My Server.", 2, 41 14 154 10, tab 100 autovs 
    } 
    

    I don't know what these values behind the tabs, texts or edits say (, 2, 41 14 154 10, tab 100 autovs). which number is for what (height, width...) and what is autovs and "option dbu"???

    Hope for help, thx

  5. but before every advertisement it checks if %advert is 1, so you can stop it.

    and i WANT that it won't stop until i deactivate it.

    But the question was, if it would work. I Tested it yesterday but it didn't work, i have addet the $1 behind mta.text but the advertisement isn't shown.

  6. would that work?

    on *:SIGNAL:mta.command: { 
      if ($3 == !advert) { 
        if ($mta.level($1,$2) >= 5) { 
          if (!$4) mta.pm $1 $2 Error - Set an advert-Message 
          else { 
            set %advertmsg $4- 
            set %advert 1 
            .timer 1 60 !.signal mta.advert $1 
          } 
        } 
        else mta.pm $1 $2 Error - You need to be level 5 to use this command 
      } 
      elseif ($3 == !stopadvert) { 
        if ($mta.level($1,$2) >= 5) { 
          unset %advert 
          unset %advertmsg 
          mta.text $1 Advert stopped 
        } 
        else mta.pm $1 $2 Error - You need to be level 5 to use this command 
      } 
    } 
    on *:SIGNAL:mta.advert: { 
      if (%advert == 1) { 
        mta.text %advermsg 
        .timer 1 60 !.signal mta.advert $1 
      } 
    } 
    

  7. noo look the command duns't work because :

    if ($mta.level($1,$2) >= 0) {

    whitout that is don't works

    if ($mta.level($1,$2) >= 0) means if the player level is greater than or equal to 0 then it will work, so all the players with no level can do the command aswell as the admins. which is kinda pointless lol

    That does no sense, if you DON'T write that (if ($mta.level($1,$2) >= 0)), ALL people can use this command too.

  8. Hey Groove,

    "on *:SIGNAL:mta.command:" you wrote:

      elseif (!max* iswm $3) mta.text $1 Hoechster Ping, denn man hier haben darf: %max - Set By: %setter . Der Standart-Ping ist 150.^^ 
      elseif ($3 == !maxund) mta.text $1 Moritz! 
    

    The !maxund-Command won't work beacause all Commands who start with !max... will show the Max-Ping.

    Use This One:

      elseif ($3 == !maxund) mta.text $1 Moritz! 
      elseif (!max* iswm $3) mta.text $1 Hoechster Ping, denn man hier haben darf: %max - Set By: %setter . Der Standart-Ping ist 150.^^ 
    

    so if the command is NOT !maxund, all other commands who start with !max will show the Maxping.

  9. What means

            if ($exists($scriptdir $+ %b)) && ($md5($scriptdir $+ %b,2) != $readini(gus.update.tmp,n,%b,md5)) { 
    

    and

        if ($md5(%a $+ .tmp,2) != $readini(gus.update.tmp,n,%a,md5)) { 
    

    ???

    What is md5?

    for GUS, the gus.tmp looks like this:

    [info] 
    Script=MTA:mA:GUS 
    Author=Tommis 
    [mtagus.mrc] 
    Version=x16 Final 
    md5=bf6357aba17fd5b6c16caf4851e9d294                       <---There is "md5" 
    Info=Update Now, Final Version! Faster, more efficient. 
    Size=55629 
    [gus.ico] 
    Version=1.0 
    md5=4b55c31209731185ee6c44919935e668                      <---And here, too. What means it? 
    Info=Icon 
    Size=1406  
    

×
×
  • Create New...