Author Topic: Working votekick for sansan  (Read 15379 times)

0 Members and 1 Guest are viewing this topic.

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Working votekick for sansan
« on: July 10, 2008, 08:40:08 pm »
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 :)

Code: [Select]

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-
      }
    }

Code: [Select]
;--- 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!
  }
}

Code: [Select]
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
  }

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Working votekick for sansan
« Reply #1 on: July 10, 2008, 08:42:30 pm »
Much Thank [SDT]F_T_F0RC3 happy !   :D :D :D :D

Offline Nemesis2500

  • Wiseguy
  • **
  • Posts: 63
  • The Joker
    • View Profile
    • Grand VCMP Server
Re: Working votekick for sansan
« Reply #2 on: July 10, 2008, 11:32:38 pm »
awesome  ;)


Offline Ry5a

  • Street Thug
  • *
  • Posts: 1
    • View Profile
Re: Working votekick for sansan
« Reply #3 on: July 11, 2008, 11:00:16 pm »
doesnt work for mee >:|

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Working votekick for sansan
« Reply #4 on: July 12, 2008, 12:19:01 am »
doesnt work for mee >:|


if it works   :-\

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Working votekick for sansan
« Reply #5 on: July 12, 2008, 12:52:33 am »
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 ;)

Offline Nemesis2500

  • Wiseguy
  • **
  • Posts: 63
  • The Joker
    • View Profile
    • Grand VCMP Server
Re: Working votekick for sansan
« Reply #6 on: July 12, 2008, 05:16:55 am »
where should icreate this?

Quote
;--- Vote Kick Alias


Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Working votekick for sansan
« Reply #7 on: July 12, 2008, 11:54:11 am »
Anywhere really, as long as it doesn't come under teh commands area. There should be a ;--- misc alias' thingy, shove it under there :)

Offline GTA-Roloboy

  • Made Man
  • ***
  • Posts: 135
    • View Profile
Re: Working votekick for sansan
« Reply #8 on: July 14, 2008, 05:05:58 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

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Working votekick for sansan
« Reply #9 on: July 18, 2008, 08:51:29 pm »
Thanks!

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Working votekick for sansan
« Reply #10 on: July 18, 2008, 09:30:50 pm »

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Working votekick for sansan
« Reply #11 on: July 19, 2008, 08:52:09 pm »

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Working votekick for sansan
« Reply #12 on: July 19, 2008, 11:16:19 pm »
a sorry  ;)          whats problem in you script sasan ? votekick not in right ?  ???

Offline bazza

  • Street Thug
  • *
  • Posts: 18
    • View Profile
Re: Working votekick for sansan
« Reply #13 on: July 27, 2008, 01:18:17 am »

Offline TanaX01

  • Made Man
  • ***
  • Posts: 214
  • BlackList! <3
    • View Profile
Re: Working votekick for sansan
« Reply #14 on: July 27, 2008, 01:20:22 am »