Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Script Showroom => Topic started by: Chezor on October 14, 2008, 09:43:17 AM

Title: Counter-Strike Script [2-cmd/only]
Post by: Chezor on October 14, 2008, 09:43:17 AM
As requested by 'punjabi_goli' i made 2 commands for him. !plantbomb and !defusebomb. He said that he will get the skin commands done himself and restart round commands etc...so heres the script with 2 cmds. note: not tested. based on general use scripts by tommis. I have made this type of script first time so maybe minor bugs in it.



;_____________________________________
;
;---(GUS)---Counter-Strike-(v1)-------
;------------by-(Chezor)--------------
;_____________________________________


;------PlaceBomb------

elseif ($2 == !placebomb) {
  if ($vcmp.skin(%name) != terrorist) vcmp.msg %id Error - Only terrorists can use this command
  elseif (bombsite !isin $vcmp.area(%id)) vcmp.msg %id Error - You are not at any bombsite
  elseif ($vcmp.bomb(%name) != 1) vcmp.msg %id Error - You do not have the C4..
  else {
    vcmp.say %name has planted the bomb at $vcmp.area(%id)
    !writeini -n vcmp.bomb.ini PLANTED check yes
    .timer 1 1 /vcmp.bombplantannounce %id %name
    .timer 1 120 /vcmp.blastit %id %name
  }
}

;------DefuseBomb-----

elseif ($2 == !defusebomb) {
  if ($vcmp.skin(%name) != counter-terrorist) vcmp.msg %id Error - Only CT can use this command
  elseif ($readini(vcmp.bomb.ini,PLANTED,check) != yes) vcmp.msg %id Error - Bomb isnt planted!
  elseif (bombsite !isin $vcmp.area(%id)) vcmp.msg %id Error - you are not at bombsite!
  elseif ($readini(vcmp.bomb.ini,DEFUSING,defusing) == yes) vcmp.msg %id Bomb is already being defused!
  else {
    .timer 1 1 !writeini -n vcmp.bomb.ini DEFUSING defusing yes
    .timer 1 1 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 10 $+ %
    .timer 1 3 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 20 $+ %
    .timer 1 6 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 30 $+ %
    .timer 1 9 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 40 $+ %
    .timer 1 12 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 50 $+ %
    .timer 1 15 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 60 $+ %
    .timer 1 18 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 70 $+ %
    .timer 1 21 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 80 $+ %
    .timer 1 24 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 90 $+ %
    .timer 1 27 $iif(bombsite isin $vcmp.area(%id)) !writeini -n vcmp.bomb.ini DEFUSE defused yes
    .timer 1 27 $iif(bombsite isin $vcmp.area(%id)) vcmp.msg %id Defusing 100 $+ %
    .timer 1 27 $iif(bombsite isin $vcmp.area(%id)) vcmp.say Bomb has been defused!!
  }
}

;------Aliases-------

alias vcmp.bombplantannounce {
  var %a = 0
  while (%a <= 20) {
    if ($readini(vcmp.bomb.ini,PLANTED,check) == yes) vcmp.announce %a BOMB HAS BEEN PLANTED
    !inc %a
  }
}

alias vcmp.blastit {
  var %a = 0
  while (%a <= 20) {
    if ($readini(vcmp.bomb.ini,DEFUSE,defused) != yes) {
      if (bombsite isin $vcmp.area(%a)) {
        vcmp.sethp %a 0
        vcmp.announce %a TERRORIST WIN
      }
    }
    !inc %a
  }
}


Intructions:
1] Rename the desired bombsite area in vcmp.data.ini to bombsite
2] put the code in general use script, in proper places..

Regards,
Chezor
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: Cristian on October 14, 2008, 09:06:22 PM
xD 2 cmd
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: Chezor on October 15, 2008, 08:15:26 AM
Quote from: Cristian on October 14, 2008, 09:06:22 PM
xD 2 cmd

Punjabi only asked those -_- i said im making more but he declined the offer...

Quote
Harpreet Singh: what?
Omi The Great: u said rimal is going to script in forum
Harpreet Singh: no
Harpreet Singh: he is just config editor
Harpreet Singh: not scripter
Harpreet Singh: hey
Harpreet Singh: when u will complete the script
Harpreet Singh: sorry
Harpreet Singh: two commands
Omi The Great: well 2 cmds only for whole serv ? -.-
Harpreet Singh: no
Harpreet Singh: other i will make it myself
Omi The Great: !restartround
Harpreet Singh: i just want that two
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: Nemesis2500 on October 15, 2008, 05:26:15 PM
kool  :P
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: thebest12 on October 20, 2008, 03:25:50 AM
omg, omg, omg!!!! yee cs i love that game and now in vc! yeeeeeeeeeeeeeeeee


thx!! omg this is the best script i have seen ever I could launch a sever with these 2 cmds onlyyy!!! yeeee
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: Punjabi on October 20, 2008, 11:35:29 AM
Lol chezor u make someone crazy.. ;D
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: thebest12 on October 21, 2008, 04:00:34 AM
yay! i am crazy  8) thx for the script
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: _Tommy on October 27, 2008, 01:49:45 PM
Maybe !buywep command will be usefully...
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: j-king on October 27, 2008, 01:57:59 PM
Also do a !teamchange, /c tt (Team Talk)
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: cola on October 27, 2008, 03:53:54 PM
Quote from: j-king on October 27, 2008, 01:57:59 PM
Also do a !teamchange, /c tt (Team Talk)
\chat = team talk
.____________________.
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: ZJY on November 20, 2008, 06:08:36 AM
Counter-Strike is Good  :o
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: Nemesis2500 on November 23, 2008, 07:54:09 PM
is this for gus10.0? please reply  ;D
Title: Re: Counter-Strike Script [2-cmd/only]
Post by: thijn on November 23, 2008, 10:06:05 PM
Yes