HUNJA Posted December 8, 2006 Share Posted December 8, 2006 Can anyone make me a votekick command,please. Link to comment
kheelo Posted December 9, 2006 Share Posted December 9, 2006 alias mta.command { ;Parameters: $1 = Server, $2 = ID, $3- = Text if ($3 == !kickvote) { if (%vote.nick. [ $+ [ $1 ] ] == $null) { if ($ini($+(",$scriptdir,$1,.ini,"),ID $+ $4)) { set %vote.nick. [ $+ [ $1 ] ] $4 set %vote.voters. [ $+ [ $1 ] ] $null mta.text $1 kickvote "!vote" if u want that $mta.nick($1,$4) shall be kicked. [ $calc($left($did(mta,$1 $+ 21),2) / 2) votes needed][30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } else mta.pm $1 Give up an existing ID-number: "!kickvote <#ID"> } else mta.pm $1 Another kickvote is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) } if (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 mta.pm $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { mta.pm $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } else mta.pm $1 $mta.nick($1,$2) You have already voted } } alias mta.vote { mta.pm $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } I tried something but it aint working. Would be nice if some pro fixed it. Link to comment
lil Toady Posted December 9, 2006 Share Posted December 9, 2006 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !votekick) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else { if (%vote.nick. [ $+ [ $1 ] ] == $null) { !set %vote.nick. [ $+ [ $1 ] ] %a !set %vote.voters. [ $+ [ $1 ] ] $null mta.text $1 Votekick: "!vote" if u think that $mta.nick($1,%a) should be kicked. [ $+ $round($mta.server($1).players / 2),0) votes needed][120 secs] !.timervote [ $+ [ $1 ] ] 1 120 mta.cancelvotekick $1- } else mta.say $1 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) } } elseif ($3 == !vote) { if (%vote.nick. [ $+ [ $1 ] ] != $null) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] !unset %vote.nick. [ $+ [ $1 ] ] !unset %vote.voters. [ $+ [ $1 ] ] !.timervote [ $+ [ $1 ] ] off } else mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $+, $calc($round($mta.server($1).players / 2),0) - $numtok(%vote.voters. [ $+ [ $1 ] ],32)) more votes and he's out! } else mta.text $1 $mta.nick($1,$2) You have already voted } } } alias mta.cancelvotekick { if ($mta.nick($1,%vote.nick. [ $+ [ $1 ] ] ) != Unknown) mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } Link to comment
HUNJA Posted December 9, 2006 Author Share Posted December 9, 2006 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4) != Unknown,$4,$mta.getid($1,$4)),$2) if ($3 == !votekick) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else { if (%vote.nick. [ $+ [ $1 ] ] == $null) { !set %vote.nick. [ $+ [ $1 ] ] %a !set %vote.voters. [ $+ [ $1 ] ] $null mta.text $1 Votekick: "!vote" if u think that $mta.nick($1,%a) should be kicked. [ $+ $round($mta.server($1).players / 2),0) votes needed][120 secs] !.timervote [ $+ [ $1 ] ] 1 120 mta.cancelvotekick $1- } else mta.say $1 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) } } elseif ($3 == !vote) { if (%vote.nick. [ $+ [ $1 ] ] != $null) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] !unset %vote.nick. [ $+ [ $1 ] ] !unset %vote.voters. [ $+ [ $1 ] ] !.timervote [ $+ [ $1 ] ] off } else mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $+, $calc($round($mta.server($1).players / 2),0) - $numtok(%vote.voters. [ $+ [ $1 ] ],32)) more votes and he's out! } else mta.text $1 $mta.nick($1,$2) You have already voted } } } alias mta.cancelvotekick { if ($mta.nick($1,%vote.nick. [ $+ [ $1 ] ] ) != Unknown) mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } This script is buggi. It dosent work correctly. Link to comment
lil Toady Posted December 9, 2006 Share Posted December 9, 2006 what actually is working wrong? I haven't tested it Link to comment
kheelo Posted December 10, 2006 Share Posted December 10, 2006 1. You can start votes on names that arent in server. 2. When vote started command !vote does nothing Link to comment
Recommended Posts