Mike Posted November 27, 2004 Share Posted November 27, 2004 mta.exit is when you leave a car Also - i though $s were used for identifiers, not commands (correct me if i'm wrong and tell me why ) Link to comment
Darkwolf Posted November 27, 2004 Share Posted November 27, 2004 This is wot i have for mta.part on *:SIGNAL:mta.part:{ if ($readini(bjack.ini,adminlist,$mta.name($1,$2)) != $null) { writeini bjack.ini onlineadmin current $remtok($readini(bjack.ini,onlineadmins,current),$mta.name($1,$2),1,46) mta.say $1 $mta.name($1,$2) has logged off as admin! } else { mta.say $1 $mta.name($1,$2) has left the game! } } it wont work summat wrong wit the $remtok Link to comment
FalconXTGT Posted November 27, 2004 Share Posted November 27, 2004 This is wot i have for mta.part on *:SIGNAL:mta.part:{ if ($readini(bjack.ini,adminlist,$mta.name($1,$2)) != $null) { writeini bjack.ini onlineadmin current $remtok($readini(bjack.ini,onlineadmins,current),$mta.name($1,$2),1,46) mta.say $1 $mta.name($1,$2) has logged off as admin! } else { mta.say $1 $mta.name($1,$2) has left the game! } } it wont work summat wrong wit the $remtok try on *:SIGNAL:mta.part:{ if ($readini(bjack.ini,adminlist,$mta.name($1,$2)) != $null) { writeini bjack.ini onlineadmin current $remtok($readini(bjack.ini,onlineadmin,current),$mta.name($1,$2),1,46) mta.say $1 $mta.name($1,$2) has logged off as admin! } else { mta.say $1 $mta.name($1,$2) has left the game! } } Link to comment
Darkwolf Posted November 27, 2004 Share Posted November 27, 2004 thats exactly the same as wot i had can we have sum1 who knows wot they are doing here! Link to comment
FalconXTGT Posted November 27, 2004 Share Posted November 27, 2004 take a closer look its not you typo (bjack.ini,onlineadmins,current),$mta.name($1,$2),1,46) (bjack.ini,onlineadmin,current),$mta.name($1,$2),1,46) you had onlineadmins instead of onlineadmin look closer next time.. Link to comment
Darkwolf Posted November 27, 2004 Share Posted November 27, 2004 MIRC says this writeini has incorrect parameters can sum 1 correct this writeini bjack.ini onlineadmin current $remtok($readini(bjack.ini,onlineadmin,current),$mta.name($1,$2),1,46) Link to comment
Oli Posted November 27, 2004 Share Posted November 27, 2004 i need to see the contents of the ini also.. why are u using tokens for such a simple purpose? Link to comment
Darkwolf Posted November 28, 2004 Share Posted November 28, 2004 I wish sum 1 cud just give me a method of removing 1 name from a list doesnt have to be complicated [/code] Link to comment
Niels Posted November 28, 2004 Share Posted November 28, 2004 if ($3 == !warned) { unset %warned set %countwarned 0 while (%countwarned < 26 ) { if ($mta.name($1,%countwarned) != Unknown) && (if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { if (%warned == $null) { %warned = $mta.name($1, %countwarned) ( $+ if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { } else { %warned = %warned $+ , $mta.name($1, %countwarned) ( $+ if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { } } %countwarned = %countwarned + 1 } if ( %warned == $null ) { mta.say $1 No people warned in this server. } else { mta.say $1 Warned people: %warned } unset %warned unset %countwarned } why is this dont work ?? Link to comment
Darkwolf Posted November 28, 2004 Share Posted November 28, 2004 if someone can fix my problem id really appreciate it Link to comment
Harry Posted November 28, 2004 Share Posted November 28, 2004 MIRC says this writeini has incorrect parameters can sum 1 correct this writeini bjack.ini onlineadmin current $remtok($readini(bjack.ini,onlineadmin,current),$mta.name($1,$2),1,46) %current = $remtok($readini(bjack.ini,onlineadmin,current),$mta.name($1,$2),1,32) if (%current != $null) { writeini bjack.ini MTA onlineadmin current } else { remini bjack.ini MTA onlineadmin current } This use create bjack.ini structured like: [MTA] onlineadmin = a b c d e something = else Link to comment
Darkwolf Posted November 28, 2004 Share Posted November 28, 2004 ty harry ur a fuckin star Link to comment
Niels Posted November 28, 2004 Share Posted November 28, 2004 Harry can you fix this ? if ($3 == !warned) { unset %warned set %countwarned 0 while (%countwarned < 26 ) { if ($mta.name($1,%countwarned) != Unknown) && (if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { if (%warned == $null) { %warned = $mta.name($1, %countwarned) ( $+ if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { } else { %warned = %warned $+ , $mta.name($1, %countwarned) ( $+ if ($readini( "MTAwarn.ini", main, $mta.name( $1, %countwarned ) ) ) { } } %countwarned = %countwarned + 1 } if ( %warned == $null ) { mta.say $1 No people warned in this server. } else { mta.say $1 Warned people: %warned } unset %warned unset %countwarned } Link to comment
Oli Posted November 28, 2004 Share Posted November 28, 2004 if $3 == !warned { var %a = 0,%b while %a < $mta.maxplayers($1) { if $ini($mta.dir $+ $1.ini,ID $+ %a) && $readini(MTAwarn.ini,main,$mta.name($1,%a)) { if %b == $null { %b = $mta.name($1,%a) } else { %b = %b $+ , $mta.name($1,%a) } } !inc %a } mta.say $1 $iif(%b == $null,No people warned in this server.,Warned people: %b) } Link to comment
Mike Posted November 29, 2004 Share Posted November 29, 2004 Another really helpful post from Aeron Link to comment
Niels Posted December 2, 2004 Share Posted December 2, 2004 ;!timeban Script - Edited! ;Code: alias mta.start { .timerunban 0 10 mta.timeunban } alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !timeban) { if ($4 != $null) { if ($5 != $null) { if ($6 != $null) { if ($mta.name($1,$4) == unknown) { mta.say $1 Error! ID $4 don't exist! } else { if ($6 == sec || $6 == min || $6 == hour || $6 == day || $6 == week) { mta.timeban $1- } else { mta.say $1 Error of synthesis, use: !timeban value (sec,min,hour,day or week). } } } else { mta.say $1 Error of synthesis, use: !timeban value (sec,min,hour,day or week). } } else { mta.say $1 Error of synthesis, use: !timeban value (sec,min,hour,day or week). } } else { mta.say $1 Error of synthesis, use: !timeban value (sec,min,hour,day or week). } } } } alias mta.timeban { %id = $4 %ip = $mta.ip($1, %id) %currenttime = $ctime if (%id == -1) { !return } %factor_text = $6 if (%factor_text == sec) { %factor = 1 } elseif (%factor_text == min) { %factor = 60 } elseif (%factor_text == hour) { %factor = 3600 } elseif (%factor_text == day) { %factor = 86400 } elseif (%factor_text == week) { %factor = 604800 } %ban_until = $calc(%currenttime + $5 * %factor) mta.say $1 $mta.name($1,$4) has been BANned by $mta.name($1,$2) 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) writeini "MTAbans.ini" ip $longip(%ip) $mta.ip($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 has been unBANned ... 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 remini "MTAbans.ini" ip %banned } } %counter = %counter + 1 } if (%bans != $null) { writeini "MTAbans.ini" bans ips %bans } else { remini "MTAbans.ini" bans ips } } alias mta.pm { if ($3- == server secret) { mta.say $1 Admin rights given to $mta.name($1,$2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } ;Tested with success... Lol, i do !timeban 0 1 sec i wait 20 sec or longer and i'am unbanned can somone PLEASE fix it ? Link to comment
Harry Posted December 10, 2004 Share Posted December 10, 2004 Decrease the timer to check more often. (this might also incluse a system crash becuase of low resources, caused by the constant checking) Link to comment
darkdreamingdan Posted December 12, 2004 Share Posted December 12, 2004 ok this is nothing to do with ur conversation at all but it is a script suggestion. could u make a DM script? now that does sound stupid, but i'll explain. there is a 30min time limit. the scoreboard is reset before hand. ppl kill, mtama monitors it like the scoreboard. at the end of the round there is a 'champ', who got the most kills and every1 is slapped to death for the next round, and scores reset. the 'champ' gets a 'champ point' for winning the round. in the next round, the name of the champ is randomly spammed (just to give him sum glory). and after say...2hrs the person with the most 'champ points' wins the...ermm.. the...set? ok so the champ points idea isnt realy needed, but i reckon this will give thecurrent gamemode a much better, and fun effect. ty bleh nuff quoted Link to comment
Jani Posted December 12, 2004 Share Posted December 12, 2004 elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { mta.say $1 $mta.name( $1 , $2 ) has kicked $mta.name( $1 , $4 ) $+ . Reason: $5- set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name( $1 , $2 )) + 1) writeini -n "MTAscript.ini" kicks $mta.name( $1 , $2 ) %kicks echo -a Server $1 : $mta.name( $1 , $2 ) kicked nr. %kicks mta.kick $1 $4 $5- } can you tell me 1) how i can make this work using wildcards, 2) make it so i cant kick myself, and 3) give me an error if there is an incorrect ID/name used Link to comment
Mike Posted December 13, 2004 Share Posted December 13, 2004 (edited) 1) $iif($4 isnum,$4,$mta.getid($1,$4) this will get you the id for the player - using either !kick or !kick 2) Put if ($iif($4 isnum,$4,$mta.getid($1,$4) != $2) at the start. 3) if ($mta.name($1,$iif($4 isnum,$4,$mta.getid($1,$4)) != unknown) Here's the whole script with the new bits added as my explanations were crap elseif ($3 == !kick) && (%ismoderator. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true || %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true) { %a = $iif($4 isnum,$4,$mta.getid($1,$4)) if (%a == $2) mta.msg $1 $2 You cannot kick yourself! elseif ($mta.name($1,%a) == unknown) mta.msg $1 $2 Invalid ID/Name else { mta.say $1 $mta.name($1,$2) has kicked $mta.name($1,%a) $+ . Reason: $5- set %kicks $calc($readini("MTAscript.ini",kicks,$mta.name($1,$2)) + 1) !writeini -n "MTAscript.ini" kicks $mta.name($1,$2) %kicks echo -a Server $1 $+ : $mta.name($1,$2) kicked nr. %kicks mta.kick $1 %a } unset %a } Hope i haven't made any mistakes Edited December 13, 2004 by Guest Link to comment
Jani Posted December 13, 2004 Share Posted December 13, 2004 nah, it dont function at all now Link to comment
MrJax Posted December 13, 2004 Share Posted December 13, 2004 uve used $iif($4 isnum,$4,$mta.name($1,$4) instead of $iif($4 isnum,$4,$mta.name($1,$4)) Link to comment
Jani Posted December 13, 2004 Share Posted December 13, 2004 yo yo yo thats nice zzz thanks, now how to make it work with wildcards? Link to comment
Recommended Posts