Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Force on July 10, 2008, 08:40:08 pm

Title: Working votekick for sansan
Post by: Force 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
  }
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 10, 2008, 08:42:30 pm
Much Thank [SDT]F_T_F0RC3 happy !   :D :D :D :D
Title: Re: Working votekick for sansan
Post by: Nemesis2500 on July 10, 2008, 11:32:38 pm
awesome  ;)
Title: Re: Working votekick for sansan
Post by: Ry5a on July 11, 2008, 11:00:16 pm
doesnt work for mee >:|
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 12, 2008, 12:19:01 am
doesnt work for mee >:|


if it works   :-\
Title: Re: Working votekick for sansan
Post by: Force 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 ;)
Title: Re: Working votekick for sansan
Post by: Nemesis2500 on July 12, 2008, 05:16:55 am
where should icreate this?

Quote
;--- Vote Kick Alias
Title: Re: Working votekick for sansan
Post by: Force 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 :)
Title: Re: Working votekick for sansan
Post by: GTA-Roloboy 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
Title: Re: Working votekick for sansan
Post by: thijn on July 18, 2008, 08:51:29 pm
Thanks!
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 18, 2008, 09:30:50 pm
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)
Title: Re: Working votekick for sansan
Post by: thijn on July 19, 2008, 08:52:09 pm
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)
I dont use GUS?
I'm using SanSan.
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 19, 2008, 11:16:19 pm
a sorry  ;)          whats problem in you script sasan ? votekick not in right ?  ???
Title: Re: Working votekick for sansan
Post by: bazza on July 27, 2008, 01:18:17 am
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)


link dosnt work
anyone have a mirror
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 27, 2008, 01:20:22 am
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)


link dosnt work
anyone have a mirror

 :o :o RULK DELATE WEBSITE SORRY  :(
Title: Re: Working votekick for sansan
Post by: bazza on July 27, 2008, 01:27:22 am
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)


link dosnt work
anyone have a mirror

 :o :o RULK DELATE WEBSITE SORRY  :(

ok thankyou
where can i find votekick for gus
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 27, 2008, 01:28:35 am
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)


link dosnt work
anyone have a mirror

 :o :o RULK DELATE WEBSITE SORRY  :(

ok thankyou
where can i find votekick for gus

no probelem  ;D
Title: Re: Working votekick for sansan
Post by: bazza on July 27, 2008, 02:23:51 am
Thanks!

you use gus:

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html

http://lukerudge.ath.cx/votekick.html    ;)


link dosnt work
anyone have a mirror

 :o :o RULK DELATE WEBSITE SORRY  :(

ok thankyou
where can i find votekick for gus

no probelem  ;D
can u ask rulk to put it back up please
i need votekick for gus
Title: Re: Working votekick for sansan
Post by: Tamas on July 27, 2008, 03:30:20 am
I puted the codes to the following locations:

Quote
;--- misc aliases
;--- account shite
;--- 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!
  }
}

event.part code:

Quote
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
  .signal vcmp.event.delplayer $1 $2
  if (%echolevel > 0) vcmp.echo 3**03 $1 $2 03left the game. $vcmp.quitreason($3)
}

And when i go to ingame than type !votekick nothing happen :(
Title: Re: Working votekick for sansan
Post by: TanaX01 on July 27, 2008, 03:33:39 am
Omg Look well!


Please Help My In :: http://forum.vicecitymultiplayer.com/index.php?topic=557.0
Title: Re: Working votekick for sansan
Post by: K.I.S.S on July 27, 2008, 03:34:00 am
this script dosnt work, i tried it myself
Title: Re: Working votekick for sansan
Post by: Force on July 27, 2008, 03:48:42 am
It works fine so it has to be something your doing wrong  :-X

If it didn't work I would not have posted it =\
Title: Re: Working votekick for sansan
Post by: bazza on July 27, 2008, 04:04:12 am
It works fine so it has to be something your doing wrong  :-X

If it didn't work I would not have posted it =\

it dosnt work
do a better one
Title: Re: Working votekick for sansan
Post by: ReVilo on July 27, 2008, 04:09:36 am
It works fine..
Title: Re: Working votekick for sansan
Post by: Nemesis2500 on July 27, 2008, 06:52:28 am
for me too...
Title: Re: Working votekick for sansan
Post by: thijn on July 27, 2008, 11:54:59 am
for me to.
Title: Re: Working votekick for sansan
Post by: bazza on July 27, 2008, 12:15:17 pm

I was bored, so i decided to whip up a simple votekick script for GUS

http://lukerudge.ath.cx/votekick.html



ok sorry but my team mate still needs rulk to put website up for gus one
Title: Re: Working votekick for sansan
Post by: Tamas on July 27, 2008, 08:03:35 pm
If its work fine than what i puted to the wrong place?
The vote kick alias , or the vcmp.event.part?
Title: Re: Working votekick for sansan
Post by: Force on July 27, 2008, 08:55:11 pm
You need to put the following code at teh bottom of the part signal:

Code: [Select]
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
}
Title: Re: Working votekick for sansan
Post by: Tamas on August 01, 2008, 10:35:41 pm
Thanks, its work now  :D
Title: Re: Working votekick for sansan
Post by: TanaX01 on August 01, 2008, 11:58:01 pm
Thanks, its work now  :D

no problem  ;)
Title: Re: Working votekick for sansan
Post by: Force on August 02, 2008, 12:31:05 am
No problem ;)