Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: jason on July 19, 2008, 04:26:55 PM

Title: sansan - money per kill
Post by: jason on July 19, 2008, 04:26:55 PM
hello

a player becomne 2500$ when he killed 5 in a row
i will change it to a player gets 500$ per kill
how can i chane it with the money per kill?
Title: Re: sansan - money per kill
Post by: bakasan on July 19, 2008, 06:33:57 PM
maybe change:

;--- killingspree system
alias vcmp.killingspree.process {
  vcmp.killingspree.processended $vcmp.nameid($1) $vcmp.nameid($2)
  !hinc vcmp killingspree. $+ $vcmp.nameid($1)
  var %k = $hget(vcmp,killingspree. $+ $vcmp.nameid($1))
  vcmp.addkillingspree $vcmp.hgetname($vcmp.nameid($1)) %k
  if (5 // %k) vcmp.killingspree.announce $1 %k
}



to something like

;--- killingspree system
alias vcmp.killingspree.process {
  vcmp.killingspree.processended $vcmp.nameid($1) $vcmp.nameid($2)
  !hinc vcmp killingspree. $+ $vcmp.nameid($1)
  var %k = $hget(vcmp,killingspree. $+ $vcmp.nameid($1))
  vcmp.addkillingspree $vcmp.hgetname($vcmp.nameid($1)) %k
  vcmp.setmon $vcmp.nameid($1) $calc($vcmp.hgetmoney($vcmp.nameid($1)) + 500)
  vcmp.gametextpm $vcmp.nameid($1) ~x~ $500!
  if (5 // %k) vcmp.killingspree.announce $1 %k
}


hope that helps ._.
Title: Re: sansan - money per kill
Post by: jason on July 19, 2008, 07:24:01 PM
and how can i add the commands !goto and !wep <weapon> <ammount>?

   
how can I change the game when the game is crashed the players money is saved
Title: Re: sansan - money per kill
Post by: TanaX01 on July 19, 2008, 10:16:51 PM
Quote from: jason on July 19, 2008, 07:24:01 PM
and how can i add the commands !goto and !wep <weapon> <ammount>?

   
how can I change the game when the game is crashed the players money is saved

in crash money save in accoundate  ;)

Title: Re: sansan - money per kill
Post by: jason on July 19, 2008, 10:58:27 PM
no if the game crashed the money you have at you is away
Title: Re: sansan - money per kill
Post by: TanaX01 on July 19, 2008, 11:06:26 PM
Quote from: jason on July 19, 2008, 10:58:27 PM
no if the game crashed the money you have at you is away

nope :S
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 12:47:11 AM
ok

and how can i add the commands !goto and !wep <weapon> <ammount>?
Title: Re: sansan - money per kill
Post by: TanaX01 on July 20, 2008, 12:54:20 AM
Quote from: jason on July 20, 2008, 12:47:11 AM
ok

and how can i add the commands !goto and !wep <weapon> <ammount>?


Commands Goto and Get:

Quoteelseif ($2 == !get) {
      if ($hget(vcmp,loggedin. $+ %id) < 2) { vcmp.adminmsg %id You must be Admin Level 4 or higher to attempt this command. }
      else { vcmp.setloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
        vcmp.adminchat **Taking:[ $vcmp.hgetname($3) ] To:[ $vcmp.hgetname(%id) ]
      }
    }
    elseif ($2 == !goto) {
      if ($hget(vcmp,loggedin. $+ %id) < 2) { vcmp.adminmsg %id You must be Admin Level 4 or higher to attempt this command. }
      else { vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }
    }

EDIT: Use !get <id> and !goto <id>  ;)

and add wep in config.ini  ;)

-TaNaX01-

Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 12:59:03 AM
!wep weapon ammount in the script to buy and not in the server.ini adden
Title: Re: sansan - money per kill
Post by: TanaX01 on July 20, 2008, 01:13:24 AM
Quote from: jason on July 20, 2008, 12:59:03 AM
!wep weapon ammount in the script to buy and not in the server.ini adden

i not dude   :-\ sorry   ;)
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 02:43:54 AM
how i can change that !get con only use admin level 10 and !goto can all users use and the must buy?
Title: Re: sansan - money per kill
Post by: TanaX01 on July 20, 2008, 03:22:34 AM
    elseif ($2 == !get) {
      if ($hget(vcmp,loggedin. $+ %id) < 10) { vcmp.adminmsg %id You must be Admin Level 4 or higher to attempt this command. }
      else { vcmp.setloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
        vcmp.adminchat **Taking:[ $vcmp.hgetname($3) ] To:[ $vcmp.hgetname(%id) ]
      }
    }
   

;)
Title: Re: sansan - money per kill
Post by: Force on July 20, 2008, 10:45:39 AM
By the way Tanax, those [ ]'s brackets are sometimes dodgy, I would use $chr(91) and $chr(93)


vcmp.adminchat **Taking: $+ $chr(91) $vcmp.hgetname($3) $chr(93) To: $+ $chr(91) $vcmp.hgetname(%id) $chr(93)


Then they should work fine with no problem's ;)
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 01:16:04 PM
!get should admin level 10 command
and
!goto should a comand for all user

can i change it?
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 04:35:40 PM
Try this:
    elseif ($2 == !get) {
      if ($hget(vcmp,loggedin. $+ %id) < 10) { vcmp.adminmsg %id You must be Admin Level 10 or higher to attempt this command. }
      else { vcmp.setloc $3 $vcmp.hgetpos.x(%id) $vcmp.hgetpos.y(%id) $vcmp.hgetpos.z(%id) 0
        vcmp.adminchat **Taking:[ $vcmp.hgetname($3) ] To:[ $vcmp.hgetname(%id) ]
      }
    }
    elseif ($2 == !goto) {
     vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }

NOTE: UNTESTED!
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 04:49:15 PM
cost goto anything when a user use it?

and how can i add the cammand !wep weapon ammo in my sansan script?
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 05:56:59 PM
And dont know the command !wep, sorry.

The goto command i gave cost the user nothing, but you can make it like so:

Quote
    elseif ($2 == !goto) {
var %cost = Here the amount you want it to cost, ex.: 1000
     vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
  vcmp.setmon $1 $calc($vcmp.hgetmoney($1) - %cost)
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 07:13:05 PM
ok thank you thijn
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 08:16:08 PM
can i change this when a player will use !goto he can typed in the name of the player?
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 08:30:40 PM
yes u can:

  elseif ($2 == !goto) {
var %cost = 1000
var %to = $vcmp.nameid($vcmp.hgetname($3))
     vcmp.setloc %id $vcmp.hgetpos.x(%to) $vcmp.hgetpos.y(%to) $vcmp.hgetpos.z(%to) 0
  vcmp.setmon $1 $calc($vcmp.hgetmoney($1) - %cost)
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }

I think this will work, Note: untested
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 08:34:11 PM
this

    elseif ($2 == !goto) {
var %cost = Here the amount you want it to cost, ex.: 1000
     vcmp.setloc %id $vcmp.hgetpos.x($3) $vcmp.hgetpos.y($3) $vcmp.hgetpos.z($3) 0
  vcmp.setmon $1 $calc($vcmp.hgetmoney($1) - %cost)
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }

dont cost anything
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 08:44:07 PM
maby this:

  elseif ($2 == !goto) {
var %cost = 1000
     vcmp.setloc %id $vcmp.hgetpos.x($vcmp.nameid($vcmp.hgetname($3))) $vcmp.hgetpos.y($vcmp.nameid($vcmp.hgetname($3))) $vcmp.hgetpos.z($vcmp.nameid($vcmp.hgetname($3))) 0
  vcmp.setmon $1 $calc($vcmp.hgetmoney($1) - %cost)
        vcmp.adminchat **Taking:[ $vcmp.hgetname(%id) ] To:[ $vcmp.hgetname($3) ]
      }
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 08:48:46 PM
ok i test it yet
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 08:49:11 PM
It work?
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 08:54:20 PM
yes but it cost nothing

pls help
Title: Re: sansan - money per kill
Post by: jason on July 25, 2008, 06:03:59 PM
how i can make the goto command and it cost?

please help
Title: Re: sansan - money per kill
Post by: Jkownz on August 28, 2008, 06:01:43 AM
works good Bakasan Thanks
Title: Re: sansan - money per kill
Post by: TanaX01 on August 28, 2008, 06:03:28 AM
Quote from: Jkownz on August 28, 2008, 06:01:43 AM
works good Bakasan Thanks

Hey You Use Script: Gus, Sasan, Windlord, Vrocker Omg!!  :-\