• Welcome to Vice City Multiplayer.
 

Working votekick for sansan

Started by Force, July 10, 2008, 06:40:08 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Force

Hey

(Please move this topic if its not in the right place ;) )

I have just spent the last 4 nearly 5 hours doing a votekick for sansan, if anyone wants it then feel free :)



on *:SIGNAL:vcmp.event.gamecmd {

    elseif ($2 == !votekick) {
      if ($hget(vcmp,loggedin. $+ %id) < 2) { vcmp.adminmsg %id You must be Admin Level 2 or higher to attempt this command. }
      elseif ($hget(VoteKick,started) == started) { vcmp.adminmsg %id There is already a vote kick in progress! }
      else {
        !hadd -m VoteKick started started
        !hadd -m ToKick $vcmp.hgetname($3) voting
        vcmp.adminchat Vote Kick started for $vcmp.hgetname($3) $+ , ID: $3 - Votes Required: 3 - Reason: $iif($4-,$v1,None) $+ , By Admin: $iif($1,$v1,Unknown)
        vcmp.adminchat Auto Recieved one vote! Two more are needed, type !vote <player id being kicked> to do so         
        vcmp.vkick $3 $vcmp.hgetname(%id) $4-
      }
    }
    elseif ($2 == !vote) {
      if ($hget(VotedTable,$vcmp.hgetname(%id)) == voted) { vcmp.adminmsg %id You have already voted! }
      elseif ($hget(ToKick,$vcmp.hgetname($3)) != voting) { vcmp.adminmsg %id This player is not up for a vote kick! }
      else {
        !hadd -m VotedTable $vcmp.hgetname(%id) voted
        vcmp.vkick $3 $vcmp.hgetname(%id) $4-
      }
    }



;--- Vote Kick Alias'

alias vcmp.votes !return $iif($readini(vcmp.votes.ini,VOTES,$vcmp.hgetname($1)),$v1,0)

alias vcmp.vkick {
  if ($vcmp.votes($1) >= 2) {
    !writeini -n vcmp.votes.ini VOTES $vcmp.hgetname($1) 3
    vcmp.adminchat Kicking $vcmp.hgetname($1) - Reason: Vote - Kicked $+ , By Admin: $iif($2,$v1,Unknown)
    vcmp.kick $1
    hdel ToKick $1
  }
  else {
    !writeini -n vcmp.votes.ini VOTES $vcmp.hgetname($1) $calc($vcmp.votes($1) + 1)
    vcmp.adminchat $vcmp.votes($1) $+ /3 votes recieved!
  }
}



on *:SIGNAL:vcmp.event.part:{

  if ($hget(ToKick,$2) == voting) {
    vcmp.adminchat Vote Kick cancelled for $2 $+ , Reason: Left the server!
    !writeini -n vcmp.votes.ini VOTES $2 0
    remini vcmp.votes.ini VOTES $2
    hdel ToKick $2
    hfree VoteKick
    hdel VotedTable $2
  }

TanaX01

Much Thank [SDT]F_T_F0RC3 happy !   :D :D :D :D

Nemesis2500



Ry5a


TanaX01


Force

Well, I throughly tested it, and it is for sansan don't forget, I would not have released it if it didnt work, you may have just put things in the wrong place ;)

Nemesis2500

where should icreate this?

Quote;--- Vote Kick Alias


Force

Anywhere really, as long as it doesn't come under teh commands area. There should be a ;--- misc alias' thingy, shove it under there :)

GTA-Roloboy

Quote from: [SDT]F_T_F0RC3 on July 10, 2008, 06:40:08 PM
Hey

(Please move this topic if its not in the right place ;) )

Doesn't this belong in 'Script Showroom'?
Anyway if it is, I can't move it :P

thijn




thijn



TanaX01

a sorry  ;)          whats problem in you script sasan ? votekick not in right ?  ???