HouseMD Posted February 23, 2007 Share Posted February 23, 2007 I haven't seen a working version of !Votekick of MTA: SA, only on one server, And yes "I've used the search button" I can't make my own because i don't know the script well enough! It would be great if someone included "!yes" and !no" btw "Please..." Link to comment
lil Toady Posted February 23, 2007 Share Posted February 23, 2007 you used the search button bad, get some skills with it, its tricky! Link to comment
HouseMD Posted February 23, 2007 Author Share Posted February 23, 2007 ok...How about 3 days of searching and looking at every topic with "!votekick" or "!voteban" in it! Link to comment
Wheelburner Posted February 24, 2007 Share Posted February 24, 2007 Clikc search and type into "search for keywords" !votekick and u will find it Link to comment
lil Toady Posted February 24, 2007 Share Posted February 24, 2007 http://forum.mtavc.com/viewtopic.php?t= ... t=votekick http://forum.mtavc.com/viewtopic.php?t= ... t=votekick http://forum.mtavc.com/viewtopic.php?t= ... t=votekick http://forum.mtavc.com/viewtopic.php?t= ... t=votekick for the first 30 seconds of searching i found this ^ Link to comment
HouseMD Posted February 24, 2007 Author Share Posted February 24, 2007 O rly? http://forum.mtavc.com/viewtopic.php?t= ... t=votekick - MTA SA/ Same buggy script http://forum.mtavc.com/viewtopic.php?t= ... t=votekick - A buggy script with no "!Yes" and "!no" http://forum.mtavc.com/viewtopic.php?t= ... t=votekick - MTA VC / the second script doesn't work on SA http://forum.mtavc.com/viewtopic.php?t= ... t=votekick - MTA VC Stop telling me i haven't used the search button properly, Because these were the first ones i looked at. Someone ready now? Link to comment
lil Toady Posted February 24, 2007 Share Posted February 24, 2007 to make a mta:vc script work for sa you only need to change mta.say to mta.text, mta.msg to mta.pm and $mta.name to $mta.nick and well, on this forum i've seen only scripts with !votekick, !vote.. no !yes or !no. Of course i can write that, but i'm bored of people not doing anything themselves. You could at least show that you tried to do something.. Link to comment
HouseMD Posted February 24, 2007 Author Share Posted February 24, 2007 I asked someone to make one with !yes and !no because i've seen a working one on a server... Edit: btw, I made lots of stuff on my script, even though I didn't know anything...I still don't understand why $4- is needed, and why there is a %vote.voters ?!?!?! I think i would be able to make it if i understood the script better Link to comment
kheelo Posted February 27, 2007 Share Posted February 27, 2007 to make a mta:vc script work for sa you only need to change mta.say to mta.text, mta.msg to mta.pm and $mta.name to $mta.nick I tried that: alias mta.command { ;Parameters: $1 = Server, $2 = ID, $3- = Text if ($3 == !votekick) { 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 Votekick "!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.text $1 Give up an existing ID-number: "!votekick <#ID"> } else mta.text $1 Another votekick 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.text $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.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 $mta.nick($1,$2) You have already voted } } alias mta.vote { mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } It does absolutelly nothing, whats wrong with it? Edit: when i changed alias mta.command { to on *:SIGNAL:mta.command:{ i get this: [17:21] [RevC]TB: !votekick ice [17:21] Give up an existing ID-number: "!votekick <#ID"> Need help ^^ Link to comment
lil Toady Posted February 27, 2007 Share Posted February 27, 2007 (edited) eheh that code must be really old on *:SIGNAL:mta.command:{ if ($3 == !votekick) { if (%vote.nick. [ $+ [ $1 ] ] == $null) { if ($ini($mta.dir $+ $1.ini,ID $+ $4)) { set %vote.nick. [ $+ [ $1 ] ] $4 set %vote.voters. [ $+ [ $1 ] ] $null mta.text $1 Votekick "!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.text $1 Give up an existing ID-number: "!votekick <#ID"> } else mta.text $1 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) } elseif (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 mta.text $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.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 $mta.nick($1,$2) You have already voted } } alias mta.vote { mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } Edited February 27, 2007 by Guest Link to comment
kheelo Posted February 27, 2007 Share Posted February 27, 2007 Hmm did u change anythin in it cause i get same result. Link to comment
lil Toady Posted February 27, 2007 Share Posted February 27, 2007 updated the post, try now. If it still doesn't work, help me and tell how does mta store players in the .ini Link to comment
kheelo Posted February 27, 2007 Share Posted February 27, 2007 Still same. You mean 1.ini? [7] Level=3 Nicks=1 IP=xxx.xxx.xxx.xxx Nick1=[RevC]W33Man Ping=21 Time=17757984 Deaths=31 Rank=14 Idle=18162484 Finish=1 [5] Level=0 Nicks=1 IP=xxx.xxx.xxx.xxx Nick1={UnEsT}M2FFi2 Ping=28 Time=18157734 Deaths=11 Rank=1 Finish=1 Idle=17675062 Link to comment
lil Toady Posted February 27, 2007 Share Posted February 27, 2007 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2) if ($3 == !votekick) { if (%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name else { set %vote.nick. [ $+ [ $1 ] ] %a unset %vote.voters. [ $+ [ $1 ] ] mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } } elseif ($3 == !vote) { if (!%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 No votekick is currently running. elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted. else { set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2 mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } } } alias mta.vote { mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } Link to comment
Scooby Posted February 28, 2007 Share Posted February 28, 2007 on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2) if ($3 == !votekick) { if (%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name else { set %vote.nick. [ $+ [ $1 ] ] %a unset %vote.voters. [ $+ [ $1 ] ] mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } } elseif ($3 == !vote) { if (!%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 No votekick is currently running. elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted. else { set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2 mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } } } alias mta.vote { mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } I see bugs for u to fix Link to comment
kheelo Posted February 28, 2007 Share Posted February 28, 2007 When vote started and you type !vote it says: No votekick is currently running. edit: It only happens when i dont use full names -.- Link to comment
Scooby Posted February 28, 2007 Share Posted February 28, 2007 From what i can see, theres a few bugs in the script. In SA, mta.getid doesnt return -1 for unknown, it returns $null. Theres a few other bugs in there too, /me slaps lil_toady. it should still kinda work. Id Fix it, but its toadys script, i'll let him sort u out Link to comment
lil Toady Posted February 28, 2007 Share Posted February 28, 2007 Well, im not scripting much for SA, only to help ppl on this forum with scripting. It differs a bit from 0.5. But i still blame Aeron for all my mistakes on *:SIGNAL:mta.command:{ var %a = $iif($iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2),$v1,-1) if ($3 == !votekick) { if (%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name elseif (%a == $2) mta.pm $1 $2 Error - Can't votekick yourself else { set %vote.nick. [ $+ [ $1 ] ] %a unset %vote.voters. [ $+ [ $1 ] ] mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } } elseif ($3 == !vote) { if ((%vote.nick. [ $+ [ $1 ] ] != $null) || (%vote.nick. [ $+ [ $1 ] ] !isnum)) mta.pm $1 $2 No votekick is currently running. elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted. else { set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2 mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } } } Link to comment
kheelo Posted February 28, 2007 Share Posted February 28, 2007 Now i can start vote only once. Once done it doesent stop itself and i cant !vote anymore as it says another votekick already running Link to comment
lil Toady Posted February 28, 2007 Share Posted February 28, 2007 oh yeh, forgot to put the mta.vote alias in the last post, get it from my previous post Link to comment
kheelo Posted February 28, 2007 Share Posted February 28, 2007 Hmm that didnt do anything i think. [21:08] [RevC]puuks: !votekick johan [21:08] * Admin say's to [RevC]puuks: Another votekick is running: Scient [21:08] [RevC]puuks: !vote [21:08] * Admin say's to [RevC]puuks: No votekick is currently running. I restarted script, server and everything i can restart and it still says the votekick to kick Scient is running Link to comment
lil Toady Posted February 28, 2007 Share Posted February 28, 2007 GRR on *:SIGNAL:mta.command:{ var %a = $iif($iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2),$v1,-1) if ($3 == !votekick) { if (%vote.nick. [ $+ [ $1 ] ] != $null) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name elseif (%a == $2) mta.pm $1 $2 Error - Can't votekick yourself else { set %vote.nick. [ $+ [ $1 ] ] %a unset %vote.voters. [ $+ [ $1 ] ] mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } } elseif ($3 == !vote) { if ((%vote.nick. [ $+ [ $1 ] ] == $null) || (%vote.nick. [ $+ [ $1 ] ] !isnum)) mta.pm $1 $2 No votekick is currently running. elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted. else { set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2 mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) { mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } } } alias mta.vote { mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } Link to comment
kheelo Posted February 28, 2007 Share Posted February 28, 2007 It works fine now Thx again man. Edit: [22:22] Someone: !votekick Alo(EST) [22:22] Votekick "!vote" if u want that Alo(EST) shall be kicked. [ 3 votes needed][60 sec] [22:22] * Kitlers_LV parted. (87.110.106.237) <<<<< Is it because of this? [22:22] Someone: !vote [22:22] 1 votes for Alo(EST) [22:22] Scient: !vote [22:22] 2 votes for Alo(EST) [22:22] Alo(EST) 2 votes, you're out! [22:22] * Alo(EST) kicked. (88.196.154.182) If so then let it be Link to comment
lil Toady Posted February 28, 2007 Share Posted February 28, 2007 yeh, that's because that player left. The script will kick a player only if 50% of players vote. So when players join/leave, the number changes Link to comment
Scooby Posted February 28, 2007 Share Posted February 28, 2007 I still see a bug Oh, and u should add a line on mta.part to end the votekick. Do u think just 50% of the votes is a good idea If ur happy playing in a server all alone, checking out some nice new maps, just chilling around and some random person joins, !votekick and ur gonna be out. Link to comment
Recommended Posts