Vice City Multiplayer

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

Title: sansan - money per kill
Post by: jason on July 19, 2008, 05: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, 07:33:57 pm
maybe change:
Code: [Select]
;--- 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
Code: [Select]
;--- 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, 08: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, 11:16:51 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, 11: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 20, 2008, 12:06:26 am
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, 01: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, 01:54:20 am
ok

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


Commands Goto and Get:

Quote
    elseif ($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, 01: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, 02:13:24 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, 03: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, 04:22:34 am
Code: [Select]
    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, 11:45:39 am
By the way Tanax, those [ ]'s brackets are sometimes dodgy, I would use $chr(91) and $chr(93)

Code: [Select]
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, 02: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, 05:35:40 pm
Try this:
Code: [Select]
    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, 05: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, 06: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, 08:13:05 pm
ok thank you thijn
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 09: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, 09:30:40 pm
yes u can:
Code: [Select]
  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, 09: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, 09:44:07 pm
maby this:
Code: [Select]
  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, 09:48:46 pm
ok i test it yet
Title: Re: sansan - money per kill
Post by: thijn on July 20, 2008, 09:49:11 pm
It work?
Title: Re: sansan - money per kill
Post by: jason on July 20, 2008, 09:54:20 pm
yes but it cost nothing

pls help
Title: Re: sansan - money per kill
Post by: jason on July 25, 2008, 07: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, 07:01:43 am
works good Bakasan Thanks
Title: Re: sansan - money per kill
Post by: TanaX01 on August 28, 2008, 07:03:28 am
works good Bakasan Thanks

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