Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Punjabi on August 28, 2008, 08:17:55 AM

Title: Bank Killing
Post by: Punjabi on August 28, 2008, 08:17:55 AM
Hi can anyone tell me how can my script autowarn when anyone kills other in bank
Help me out ;)
Title: Re: Bank Killing
Post by: szostol on August 28, 2008, 12:11:27 PM
Quoteif ((%victim != Unknown) && (%killer != Unknown)) {
   if (Sunshine Autos isin ($vcmp.area(%victim))
      vcmp.warn %killer Auto-Warn Killing at Sunshine Autos
      !writeini vcmp.log.ini WARNS $vcmp.name(%killer) Sunshine killing - $fulldate $vcmp.ip($vcmp.name(%killer))
   }

It's my version but dunny why doesn't work. You can try repair it and use.
Title: Re: Bank Killing
Post by: Punjabi on August 28, 2008, 06:23:20 PM
i want a code of WSV not of GUS :-[
Title: Re: Bank Killing
Post by: VRocker on August 28, 2008, 06:51:24 PM
Thanks to WSV having aliases to make this a lot easier... This turns into 5 lines of script! :)

This is untested but i'm fairly certain it will work (Aslong as the bank is actually called 'Bank' but you can change that)

on *:SIGNAL:WSV.kill {
  if ( ( $wsv.loco( $2 ) == Bank ) && ( $wsv.loco( $3 ) == Bank ) ) {
    wsv.say $wsv.Warn( $2, Auto-Admin, Killing in the bank )
  }
}
Title: Re: Bank Killing
Post by: Punjabi on August 29, 2008, 09:04:25 AM
Thanks
I will test it ;D
Title: Re: Bank Killing
Post by: Punjabi on August 30, 2008, 06:17:17 PM
but its not working :'(
where to paste it in vcmp.mrc
or i have to replace it with some line
plz help
Title: Re: Bank Killing
Post by: thijn on August 30, 2008, 06:28:22 PM
U need to put it in the Kill signal i think ;)
Title: Re: Bank Killing
Post by: Azrooh on August 30, 2008, 06:30:23 PM
Quote from: Punjabi on August 28, 2008, 06:23:20 PM
i want a code of WSV not of GUS :-[

vcmp.mrc = GUS
WSV.mrc = wsv
Title: Re: Bank Killing
Post by: thijn on August 30, 2008, 08:21:42 PM
replace

on *:SIGNAL:WSV.kill {
  ;WSV.say KillerID: $2 $+ , KilledID: $3 $+ , Killed/Died: $4 $+ , Wep: $5 $+ , KillerTeam: $6 $+ , Killed Team: $7
  WSV.autoremoveracer $1 $3
  hadd -m WSV.spawned $WSV.getname($3) No
  if (% [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]) unset % [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]
  var %killer = $WSV.getname($2),%killed = $WSV.getname($3),%spree = $hget(WSV.spree,%killer),%endspree = $hget(WSV.spree,%killed)
  echo.msg 3->  $+ $c.echoa(%killer,%killer) $+  3 $+ $4 $+   $+ $c.echoa(%killed,%killed) $+ 3 ( $+ $WSV.weaponname( $5 ) $+ ) 
  if ($5 == 42) WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon )
  elseif ($5 == 39) { WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon ) }
  else {
    WSV.addspree $2
    WSV.endspree $2 $3
    if ($WSV.pass(%killer)) && ($WSV.loggedin(%killer)) {
      hinc WSV.kills %killer
      hinc WSV.money %killer 1000
      WSV.setcash $2 $WSV.money(%killer)
    }
    if ($WSV.pass(%killed)) && ($WSV.loggedin(%killed)) {
      hinc WSV.killed %killed
      if ($WSV.money($3) >= 250) hdec WSV.money %killed 250
      WSV.setcash $3 $WSV.money(%killed)
    }
  }
}

with:

on *:SIGNAL:WSV.kill {
  if ( ( $wsv.loco( $2 ) == Bank ) && ( $wsv.loco( $3 ) == Bank ) ) {
    wsv.say $wsv.Warn( $2, Auto-Admin, Killing in the bank )
  }
  ;WSV.say KillerID: $2 $+ , KilledID: $3 $+ , Killed/Died: $4 $+ , Wep: $5 $+ , KillerTeam: $6 $+ , Killed Team: $7
  WSV.autoremoveracer $1 $3
  hadd -m WSV.spawned $WSV.getname($3) No
  if (% [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]) unset % [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]
  var %killer = $WSV.getname($2),%killed = $WSV.getname($3),%spree = $hget(WSV.spree,%killer),%endspree = $hget(WSV.spree,%killed)
  echo.msg 3->  $+ $c.echoa(%killer,%killer) $+  3 $+ $4 $+   $+ $c.echoa(%killed,%killed) $+ 3 ( $+ $WSV.weaponname( $5 ) $+ ) 
  if ($5 == 42) WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon )
  elseif ($5 == 39) { WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon ) }
  else {
    WSV.addspree $2
    WSV.endspree $2 $3
    if ($WSV.pass(%killer)) && ($WSV.loggedin(%killer)) {
      hinc WSV.kills %killer
      hinc WSV.money %killer 1000
      WSV.setcash $2 $WSV.money(%killer)
    }
    if ($WSV.pass(%killed)) && ($WSV.loggedin(%killed)) {
      hinc WSV.killed %killed
      if ($WSV.money($3) >= 250) hdec WSV.money %killed 250
      WSV.setcash $3 $WSV.money(%killed)
    }
  }
}



Quote from: Azrooh on August 30, 2008, 06:30:23 PM
Quote from: Punjabi on August 28, 2008, 06:23:20 PM
i want a code of WSV not of GUS :-[

vcmp.mrc = GUS
WSV.mrc = wsv
lol, he means he wants a code for his WSV script, szostol posted a code for GUS ;)
Title: Re: Bank Killing
Post by: Punjabi on September 03, 2008, 05:46:15 PM
 ???But its not working?
:'(
Title: Re: Bank Killing
Post by: Punjabi on September 04, 2008, 10:47:07 AM
Hey thijn u have replied a wrong one when i placed it with old one it do nothing
plz anyone can help me out?
:-\ :'(
Title: Re: Bank Killing
Post by: szostol on September 04, 2008, 01:50:17 PM
Punjabi! Do something your self... you got much examples... try repair it... You all time want sometginh... it's too anoying..
Title: Re: Bank Killing
Post by: Punjabi on September 04, 2008, 06:41:05 PM
U have done anything ursely first tell me that than tell me and ur 99% given suggestions are useless :(
Title: Re: Bank Killing
Post by: thijn on September 04, 2008, 06:51:21 PM
Quote from: szostol on September 04, 2008, 01:50:17 PMtry repair it...
I agree, if a script dont work, try to repair it.
If it doesnt work after you tried to repair it, We try to help you, But try to repair it before you post.
Title: Re: Bank Killing
Post by: Punjabi on September 13, 2008, 09:19:47 AM
If i can i will repair it  8)
Title: Re: Bank Killing
Post by: Windlord on September 14, 2008, 06:42:52 AM
31.=El Banco Corrupto Grande, Bank of Vice City
32=413.900360,111.847626,398.762024,100.878082,424.556763,69.132515,436.172058,78.987656


That's the full name
Therefore,

on *:SIGNAL:WSV.kill {
;WSV.say KillerID: $2 $+ , KilledID: $3 $+ , Killed/Died: $4 $+ , Wep: $5 $+ , KillerTeam: $6 $+ , Killed Team: $7
  WSV.autoremoveracer $1 $3
  hadd -m WSV.spawned $WSV.getname($3) No
  if (% [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]) unset % [ $+ [ passenger $+ . $+ [ $WSV.name($3) ] ] ]
  var %killer = $WSV.getname($2),%killed = $WSV.getname($3),%spree = $hget(WSV.spree,%killer),%endspree = $hget(WSV.spree,%killed)
  echo.msg 3->  $+ $c.echoa(%killer,%killer) $+  3 $+ $4 $+   $+ $c.echoa(%killed,%killed) $+ 3 ( $+ $WSV.weaponname( $5 ) $+ ) 
  if ((Bank isin $WSV.loco($2)) && (Bank isin $WSV.loco($3))) WSV.say $WSV.warn( $2, Auto-Admin, Killing in the bank )
  elseif ($5 == 42) WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon )
  elseif ($5 == 39) { WSV.say $WSV.warn( $2 , Auto-Admin , Invalid Weapon ) }
  else {
    WSV.addspree $2
    WSV.endspree $2 $3
    if ($WSV.pass(%killer)) && ($WSV.loggedin(%killer)) {
      hinc WSV.kills %killer
      hinc WSV.money %killer 1000
      WSV.setcash $2 $WSV.money(%killer)
    }
    if ($WSV.pass(%killed)) && ($WSV.loggedin(%killed)) {
      hinc WSV.killed %killed
      if ($WSV.money($3) >= 250) hdec WSV.money %killed 250
      WSV.setcash $3 $WSV.money(%killed)
    }
  }
}


PS. Why don't you try searching the WSV folder next time.
Title: Re: Bank Killing
Post by: Punjabi on September 14, 2008, 01:30:12 PM
Thanks again......
Now i am learning how to make script and i hope u will help me in modifying the WSV script :D
If u want or interested to help me plz PM me with your result  (Yes/No)
Now i will put efforts to modify WSV.. ;D ;D
Title: Re: Bank Killing
Post by: ilgabri on September 14, 2008, 11:12:12 PM
I've wrote that for GUS

DOESN'T WORK (GUS 10.0)

if ((%victim != Unknown) && (%killer != Unknown)) {
vcmp.msg %killer Killed - Victim: $vcmp.name(%victim) $+ , Weapon: $vcmp.weapon.name(%weapon) $+ , Reward: $ $+ $bytes($vcmp.reward(%killer),b) $+ , Range: $vcmp.distince.rate($vcmp.distince(%killer,%victim)) $+ ( $+ $vcmp.distince(%killer,%victim) Meters) $+ , Location: $vcmp.area(%victim)
vcmp.add.kills %killer 1
if (( $vcmp.area($2) == Bank ) && ( $vcmp.area($3) == Bank ) ) {
vcmp.say $vcmp.warn( %killer, Auto-Admin, Killing in the bank )
vcmp.cash+ %victim $vcmp.reward(%victim)
} else {
vcmp.cash+ %killer $vcmp.reward(%killer)
}
}

Title: Re: Bank Killing
Post by: Punjabi on September 15, 2008, 06:11:21 PM
Thanks but i am not intersted in GUS i like scripting WSV... :-* :-*
Title: Re: Bank Killing
Post by: ilgabri on September 15, 2008, 11:53:58 PM
Doesn't matter... anyway the subject is generic.... were not a specific subject about WSV...