Jump to content

Harry

MTA Contributors
  • Posts

    580
  • Joined

  • Last visited

Everything posted by Harry

  1. Harry

    MTAMA Scripting

    There isn't if you're using the run command. You can try to find the winamp plugin, that one has a stop. Or you can run a command that only plays the wave 1 time BTW, you're gay sig has errors
  2. Harry

    MTAMA Scripting

    if ($3 == !rang || $3 == !status || $3 == !level ) { if ( %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true ) { mta.say $1 $mta.name($1,$2) - Rang: Server Admin } if (ZC isin $mta.name($1,$4) ) { mta.say $1 $mta.name($1,$4) - Rang: Clan Member } elseif (ZC isin $mta.name($1,$2) ) { mta.say $1 $mta.name($1,$2) - Rang: Clan Member } } Depending on what you want, i suggest using consequently $2 OR $4, or use 'elseif; in front of the first 'ZC isin' .. In this way, double names can occur. With elseif they won't
  3. Harry

    MTAMA Scripting

    Nope, he has 2x 'else' that is not possible
  4. Harry

    MTAMA Scripting

    I understand out of your question that you want to stop the timer. That is possible, just use 'timer 1 off' in your case. Better is te rename the timer to timershutdown and stop that one.
  5. Harry

    MTAMA Scripting

    Oh, while looking another time at your script, i noticed you're not closing mta.text part, put a } in a new line in front of mta.warn If it still isn't working, conact me on msn, so i can have a look at your complete script
  6. Harry

    MTAMA Scripting

    Code: alias mta.join { elseif Is wrong, first if can't be elseif. Change 'elseif' to if There is no mta.id call inhere, so you can't use names to warn, you havee to use the id's.. that's what the error tells you.. Try the !warnings with an id (number) too. if that isn't working either, post the message mirc prints in here If this is your wholte script, it it not strnage that every person can type !warn.. There are no admin functions whatsoever. So the %isadmin is never set to false if a person joins, this means every person is an admin...
  7. Harry

    MTAMA Scripting

    Did you build an admin check in? In the mta.warn there isn't one, so it has to be at the call. In mta.text for example: elseif($3==!warn && %isadmin.$1.$2) { mta.warn $1- } Or something like that
  8. Harry

    MTAMA Scripting

    fastphp, the mta.getid is allready serveral times in this topic, and it is allready large enough. Why post it over and over again??? Use the search, Luke!
  9. Harry

    MTAMA Scripting

    HM.. I don't like to have my scripts posted on someone else's server, mainly because i like to see how many times it is downloaded. That's why i never posted my complete script in this thread... I will place it on my server soon
  10. Harry

    MTAMA Scripting

    I think a website like that sould have 24/7 hosting.. 23 h/day is nice, but i know several ways to provide 24/7 hosting... Furthermore, this is only one topic.. why do you need 5 or 6 helpers??? Just give Aeron a forum, let oli and some other guy be admins and all problems can be solved.... Why choosing the hard way?
  11. Harry

    MTAMA Scripting

    Hm... What does THAT do???? I this this is allways true... Any other function in mind??
  12. Harry

    MTAMA Scripting

    Can i request a split up of this topic? Many people are asking me for some scripts, and if i refer to this page, they can't find it. Also the search only gives the topic, not the right page.. It's getting quite annoing. Or Aeron could start a froum for MTAMA scripting questions only, i think there are enough questions... Harry P.S. My server has been reconnected by my ISP, and i'm working on a new version of my scripts.. Any suggestions?
  13. Harry

    MTAMA Scripting

    I suggest you search this topic for the mta.getip function.. If something doens't work... UTFS!
  14. Harry

    MTAMA Scripting

    Try this: alias mta.kill { if (($mta.kills($1,$2) == 30) && ($mta.deaths($1,$2) == 00)) { mta.say $1 $mta.name($1,$2) , you are suspected of unsing cheats (reason: 30 kills and 0 deaths), if I am mistaken , sorry ! mta.kick $1 $2 } } Why the $2 and $3 in kills... that are 2 different players.. I suggest using only one. Taking the killed number of kills and the killers deaths is not what you want i think Using right brackets, { and } , is required as well if there are more line within the if statement. Hope this is what you want
  15. Harry

    MTAMA Scripting

    I think it should. I suggest using elseif, that's a bit faster (if the mirc compiler is smart enough) If this didn't work, count the balance between { and } .. one mistake, and you're whole script might be broken
  16. Harry

    MTAMA Scripting

    please read the help of the if statement.. This one is completely incorrect. I think it should be something like: if (BmF isin $mta.name($1,$2)) { in mta.kill... You can't use mta.kill as a polling variable. BTW: sorry Opium, couldn't answer quicker, trouble with my ISP.. But thanks to Oli for helping him
  17. Harry

    MTAMA Scripting

    Post your shitlist method please, i know 3 different inplementation, all requiring another type of add. A writeini is possible if it's in a ini, a write if it's a txt
  18. Harry

    MTAMA Scripting

    Yes, it is, i thought. Just try it. If i remember correctly a suicide is a normal kill, with killer and killed the same.. just compare and log. there is no war as far as i know to read out the amount. I rested it with a /kill and a echo -a $mta.name( $1 , $3 ) $3 killed $mta.name( $1 , $2 ) $2 in mirc. The 'x died' you have to try for yourself Q to Aeron: Why am i remembering id's of 254 and 255? Was that the old mtama??
  19. Harry

    MTAMA Scripting

    a) this is not english above b) yes, that script is stolen c) yes, i wrote it d) yes, it has to be removed, you copied it without aknowledgements e) yes, it was free for download for all f) the script that is on my server has many improvements So.. an a mod/admin remove it.. i'll post a link to the script right after the removal (and after my server has been reconnected by my ISP.. another attack on my server) EDIT: damn.. this is first-version of the script, with all my own comments in it.. thought i gave it to a person i could trust.. NOT EDIT2: Hm.. Mr (cc)Rambo changed a few things in the script.. it's all wrong, full of errors... please don't use this one.
  20. Harry

    MTAMA Scripting

    Vass.. use the search.. it's in THIS topic.. page 4 if i'm correct
  21. Harry

    MTAMA Scripting

    Because you're using $4 in $mta.name($1,$4), you'll have to type !stats If you want to give the persons own stats, you should change $4 to $2
  22. Harry

    MTAMA Scripting

    [OT] Wow.. You keep remembering me why i still hate mirc script [/OT] For the overall kills/deaths (weren't they inhere somewere?), i couldn't find them with the search. Insert into mta.kill set %kills $calc($readini("MTAStats.ini",kills,$mta.name( $1 , $3 )) + 1) set %deaths $calc($readini("MTAStats.ini",deaths,$mta.name( $1 , $2 )) + 1) writeini -n "MTAStats.ini" kills $mta.name( $1 , $3 ) %kills writeini -n "MTAStats.ini" deaths $mta.name( $1 , $2 ) %deaths unset %kills unset %deaths Insert into somewere else, where you like it (for example in mta.text): elseif (!3=stat) { mta.say $1 Overall kills: $calc($readini("MTAstats.ini",kills,$mta.name( $1 , $2 ))) Deaths: $calc($readini("MTAstats.ini",deaths,$mta.name( $1 , $2 ))) Ratio: $round( $calc($readini("MTAstats.ini",kills,$mta.name( $1 , $2 )) / $readini("MTAstats.ini",deaths,$mta.name( $1 , $2 ))) , 2) Online: $duration($mta.online($1,$2)) Status: $iif($mta.game($1,$2) == 1,Out Game,In Game) }
  23. Harry

    MTAMA Scripting

    Hmm.. i thought Aeron posted that one allready, for those which haven't seen it yet, here it is: alias mta.getid { set %playerid 0 set %return -1 if ( $2 == $null ) { !return -1 } if ( $2 isnum ) { !return $2 } else { while ( $mta.maxplayers($1) > %playerid ) { if ( $ini( $+ $1 $+ .ini, ID $+ %playerid ) ) { if ($mta.name($1, %playerid) == $2) { !return %playerid } } %playerid = %playerid + 1 } } unset %playerid mta.say $1 Unknown player: $2 !return -1 } BTW, the code in my previous post is not working ATM bocause something went wrong c/p it. I'm looking for the error. - EDIT- Solved, i hate spaces The lenghth is because of the multiple servers, that is giving a lot of problems
  24. Harry

    MTAMA Scripting

    A slightly updated timeban script, featuring: - Recovering after MTAMA turnoff (Still no unban when MTAMA is off) - Multiple servers (Last bantime will be the unban on all banned servers) - Bantimes in secs, mins, hours and days Insert in mta.start .timerunban 0 10 mta.timeunban Insert in mta.say something equivalent to: elseif ($3 == !timeban && %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { mta.timeban $1- } And to finish it all, insert these method at the bottom of your script: alias mta.timeban { %id = $mta.getid($1,$4) %ip = $mta.ip($1, %id) %currenttime = $ctime if (%id == -1) { !return } %factor_text = $6 if (%factor_text == sec || %factor_text == s || %factor_text == secs || %factor_text == seconds) { %factor = 1 } elseif (%factor_text == min || %factor_text == m || %factor_text == mins || %factor_text == minutes) { %factor = 60 } elseif (%factor_text == hour || %factor_text == h || %factor_text == hours) { %factor = 3600 } elseif (%factor_text == day || %factor_text == d || %factor_text == hours || %factor_text == uur || %factor_text == uren) { %factor = 86400 } elseif (%factor_text == week || %factor_text == w || %factor_text == weeks) { %factor = 604800 } %ban_until = $calc(%currenttime + $5 * %factor) mta.say $1 $4 has been banned until $asctime(%ban_until) %bans = $readini( "MTAbans.ini", bans, ips) %bans = $addtok(%bans, $longip(%ip), 32) %servers = $readini( "MTAbans.ini", servers, $longip(%ip)) %servers = $addtok(%servers, $1, 32) writeini "MTAbans.ini" bans ips %bans writeini "MTAbans.ini" banduration $longip(%ip) %ban_until writeini "MTAbans.ini" server $longip(%ip) %servers writeini "MTAbans.ini" name $longip(%ip) $mta.name($1,%id) mta.ban $1 %id } alias mta.timeunban { %bans = $readini( "MTAbans.ini", bans, ips) %num_bans = $numtok(%bans, 32) %currenttime = $ctime %counter = 0 while (%counter < %num_bans) { if (%num_bans > 1) { %banned = $gettok( %bans , %counter + 1 , 32) } else { %banned = %bans } if (%banned != $null) { %ban_until = $readini( "MTAbans.ini", banduration, %banned ) if (%ban_until < %currenttime) { %servers = $readini( "MTAbans.ini", server, %banned) %name = $readini( "MTAbans.ini", name, %banned) %num_servers = $numtok(%servers,32) %counter2 = 0 while (%counter2 < %num_servers) { %server = $gettok( %servers , %counter2 + 1 , 32) mta.say %server %name ( $+ $longip(%banned) $+ ) is unbanned (timer) mta.unban %server $longip(%banned) %counter2 = %counter2 + 1 } %bans = $remtok(%bans, %banned, 32) %num_bans = $calc(%num_bans - 1) %counter = %counter - 1 remini "MTAbans.ini" banduration %banned remini "MTAbans.ini" server %banned remini "MTAbans.ini" name %banned } } %counter = %counter + 1 } if (%bans != $null) { writeini "MTAbans.ini" bans ips %bans } else { remini "MTAbans.ini" bans ips } } (I hope this post is not too long ) EDIT: c/p error (space inserted) solved
×
×
  • Create New...