Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: gamyster on October 14, 2008, 11:10:39 am

Title: WSV !CAR PROBLEM
Post by: gamyster on October 14, 2008, 11:10:39 am
in WSV !car script when i type !car it shows !car   =SAF=Quake4's car: ID: 146, Name: Packer, Health: 100, Owner: Mr.john.

but the car which no one has owned like !car =SAF=Quake4's car: ID: 171, Name: Hunter, Health: 100.

as it should be like

!car =SAF=Quake4's car: ID: 171, Name: Hunter, Health: 100. Owner=None Price:100000
Title: Re: WSV !CAR PROBLEM
Post by: thijn on October 14, 2008, 12:08:50 pm
Pleas post ur !car
Title: Re: WSV !CAR PROBLEM
Post by: gamyster on October 14, 2008, 01:08:03 pm
i dont know why but i cant find the car script in WSV!
Title: Re: WSV !CAR PROBLEM
Post by: gamyster on October 14, 2008, 01:08:46 pm
MAY BE THIS:-




alias WSV.carinfo {
  var %id = ID: $1
  var %name = Name: $hget(WSV.Config.Cars,$1)
  var %health = Health: $round($calc($WSV.vehicle($WSV.id($2)).health / 10),0)
  var %owner = Owner: $WSV.carowners($1)
  var %shared = Shared with: $WSV.sharecarowners($1)
  var %cost = Cost: $ $+ $WSV.carprices($1)
  var %speed = Max.Speed: $vcar.getspeed($1)
  var %acc = Max.Acc.: $vcar.getacc($1)
  var %mass = Mass: $vcar.getmass($1)
  var %say.d = %id $+ $chr(44) %name $+ $chr(44) %health
  var %say.p = %id $+ $chr(44) %name
Title: Re: WSV !CAR PROBLEM
Post by: Windlord on October 14, 2008, 02:33:34 pm
There is a slight problem with the !car script.
Please use the one below;

Code: [Select]
alias WSV.carinfo {
  var %id = ID: $1
  var %name = Name: $hget(WSV.Config.Cars,$1)
  var %health = Health: $round($calc($WSV.vehicle($WSV.id($2)).health / 10),0)
  var %owner = Owner: $WSV.carowners($1)
  var %shared = Shared with: $WSV.sharecarowners($1)
  var %cost = Cost: $ $+ $WSV.carprices($1)
  var %speed = Max.Speed: $vcar.getspeed($1)
  var %acc = Max.Acc.: $vcar.getacc($1)
  var %mass = Mass: $vcar.getmass($1)
  var %say.d = %id $+ $chr(44) %name $+ $chr(44) %health
  var %say.p = %id $+ $chr(44) %name

  if ($hget(WSV.Cars,$1 $+ CarOwners)) {
    var %say.d = %say.d $+ $chr(44) %owner
    var %say.p = %say.p $+ $chr(44) %owner
  }
  if ($hget(WSV.Cars,$1 $+ ShareCarOwners)) {
    var %say.d = %say.d $+ $chr(44) %shared
    var %say.p = %say.p $+ $chr(44) %shared
  }
  elseif ($readini(" $+ $scriptdirCarPrices.ini",Prices,$1)) {
    var %say.d = %say.d $+ $chr(44) %cost
    var %say.p = %say.p $+ $chr(44) %cost
  }
  if ($prop == d) .return $WSV.name($2) $+ ' $+ s car: %say.d
  if ($prop == p) .return $WSV.name($2) is a passenger on: %say.p
}

And owners aren't shown if the car is not owned.
Title: Re: WSV !CAR PROBLEM
Post by: Tamas on October 14, 2008, 04:37:34 pm
Heres mine it works perfectly. And uses the same style what LW have (i think that is the most clearable.)

Code:
Quote
  elseif (car iswm $3) {
    if ($WSV.pconnected($2)) && (!$4) {
      var %a = $WSV.vehicle($2)
      if ($WSV.vehicle($2) != 0) { WSV.msg $2 $WSV.carinfo(%a,$2).d }
      elseif (% [ $+ [ passenger $+ . $+ [ $WSV.name($2) ] ] ]) {
        var %b = % [ $+ [ passenger $+ . $+ [ $WSV.name($2) ] ] ]
        WSV.msg $2 You are a passenger in this vehicle.
        WSV.msg $2 $WSV.carinfo(%b,$2).p
      }
      else WSV.msg $2 You are currently on foot.
    }
    elseif ($WSV.pconnected($4)) {
      var %a = $WSV.vehicle($WSV.id($4))
      if ($WSV.vehicle($WSV.id($4)) != 0) { WSV.msg $2 $WSV.name($4) $+ 's Vehicle Stats: | WSV.msg $2 $WSV.carinfo(%a,$4).d }
      elseif (% [ $+ [ passenger $+ . $+ [ $WSV.name($4) ] ] ]) {
        var %b = % [ $+ [ passenger $+ . $+ [ $WSV.name($4) ] ] ]
        WSV.msg $2 $WSV.name($4) is a passenger in:
        WSV.msg $2 $WSV.carinfo(%b,$4).p
      }
      else WSV.msg $2 $WSV.name($4) is currently on foot.
    }
  }

Alias:
Quote
alias WSV.carinfo {
  var %id = ID: $chr(91) $1 $chr(93)
  var %name = Name: $chr(91) $hget(WSV.Config.Cars,$1) $chr(93)
  var %health = Health: $chr(91) $round($calc($WSV.vehicle($WSV.id($2)).health / 10),0) $+ % $chr(93)
  var %owner = Owner: $chr(91) $WSV.carowners($1) $chr(93)
  var %sowner = Owner: $chr(91) Sunshine-Autos $chr(93)
  var %shared = Shared with: $chr(91) $WSV.sharecarowners($1) $chr(93)
  var %cost = Price: $chr(91) $ $+ $WSV.carprices($1) $chr(93)
  var %speed = Max.Speed: $vcar.getspeed($1)
  var %acc = Max.Acc.: $vcar.getacc($1)
  var %mass = Mass: $vcar.getmass($1)
  var %say.d = %id %name %health
  var %say.p = %id %name

  if ($hget(WSV.Cars,$1 $+ CarOwners)) {
    var %say.d = %say.d %owner
    var %say.p = %say.p %owner
  }
  if ($WSV.carowners($1) == none) {
    var %say.d = %say.d %sowner
    var %say.p = %say.p %sowner
  }
  if ($hget(WSV.Cars,$1 $+ ShareCarOwners)) {
    var %say.d = %say.d %shared
    var %say.p = %say.p %shared
  }
  if ($hget(WSV.Cars,$1 $+ CarPrices)) && ($WSV.carowners($1) == none) {
    var %say.d = %say.d %cost
    var %say.p = %say.p %cost
  }
  if ($prop == d) .return %say.d
  if ($prop == p) .return %say.p
}
Title: Re: WSV !CAR PROBLEM
Post by: gamyster on October 14, 2008, 07:40:00 pm
Thanx SRS.hey please help i have a skin which is tommy and i want it that only =SAF= members can spawn with that skin if any other NON SAF player joins if he choose skins his HP should get 0 and say that This Skin is Only FOR =SAF=Clan Members
Title: Re: WSV !CAR PROBLEM
Post by: Chezor on October 14, 2008, 07:52:11 pm
Thanx SRS.hey please help i have a skin which is tommy and i want it that only =SAF= members can spawn with that skin if any other NON SAF player joins if he choose skins his HP should get 0 and say that This Skin is Only FOR =SAF=Clan Members

i have made it using GUS for my server  ;)
Title: Re: WSV !CAR PROBLEM
Post by: thijn on October 14, 2008, 08:17:56 pm
You can chk the area were that skin spawns in, if it is the are were the Tommy skin spawn, u can set the HP to 0 ;)
Title: Re: WSV !CAR PROBLEM
Post by: Tamas on October 14, 2008, 11:49:25 pm
Or check if he is higher than lvl1 (i think all SAF members are admins on that server) + if playermodel Tommy, than sethp to 0.
I prefer this method.
Title: Re: WSV !CAR PROBLEM
Post by: Chezor on October 15, 2008, 09:17:08 am
Or check if he is higher than lvl1 (i think all SAF members are admins on that server) + if playermodel Tommy, than sethp to 0.
I prefer this method.

Everyone have their own style you know...
Title: Re: WSV !CAR PROBLEM
Post by: evil_night13 on October 15, 2008, 03:06:55 pm
Or check if he is higher than lvl1 (i think all SAF members are admins on that server) + if playermodel Tommy, than sethp to 0.
I prefer this method.

Everyone have their own style you know...

yeah , ur both ideas sounds good! :D
Title: Re: WSV !CAR PROBLEM
Post by: evil_night13 on October 20, 2008, 11:25:04 am
Heres mine it works perfectly. And uses the same style what LW have (i think that is the most clearable.)



iam using this, but now the price is not shown , even when the price is set or unset, there is no price tab!
Title: Re: WSV !CAR PROBLEM
Post by: Tamas on October 20, 2008, 07:38:40 pm
Hmm I don't know why, its working fine for me.