Jump to content

Votekick for MTA:SA


onkelz98

Recommended Posts

Hi

Have a Problem with Votekick for MTA:SA

can me help

thx

on *:SIGNAL: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.name($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 
} 
else mta.text $1 Another votekick is running: $mta.name($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.say $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) 
if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { 
mta.text $1 $mta.name($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.name($1,$2) You have already voted 
} 

} 
alias mta.vote { 
mta.text $1 Vote kick cancelled: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) 
unset %vote.nick. [ $+ [ $1 ] ] 
unset %vote.voters. [ $+ [ $1 ] ] 

}

Link to comment
  • 1 month later...

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 added some SA stuff there but can someone make it really work..

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...