Author Topic: WSV !CAR PROBLEM  (Read 7054 times)

0 Members and 1 Guest are viewing this topic.

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
WSV !CAR PROBLEM
« 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
« Last Edit: October 14, 2008, 11:15:16 am by gamyster »
Founder of [SAF]Clan

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV !CAR PROBLEM
« Reply #1 on: October 14, 2008, 12:08:50 pm »
Pleas post ur !car

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV !CAR PROBLEM
« Reply #2 on: October 14, 2008, 01:08:03 pm »
i dont know why but i cant find the car script in WSV!
Founder of [SAF]Clan

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV !CAR PROBLEM
« Reply #3 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
Founder of [SAF]Clan

Windlord

  • Guest
Re: WSV !CAR PROBLEM
« Reply #4 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.

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV !CAR PROBLEM
« Reply #5 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
}
« Last Edit: October 14, 2008, 04:39:30 pm by [SRS]Tomi »

Offline gamyster

  • Wiseguy
  • **
  • Posts: 61
    • View Profile
Re: WSV !CAR PROBLEM
« Reply #6 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
Founder of [SAF]Clan

Offline Chezor

  • Wiseguy
  • **
  • Posts: 90
  • RPG Planet Scripter
    • View Profile
    • RPG Planet
Re: WSV !CAR PROBLEM
« Reply #7 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  ;)

Scripts: Fuel system in vehicles, Speedometer, Spawnback, Improved Copwork, Improved Jailing, Improved phone with sms, and many more. Coming soon..

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: WSV !CAR PROBLEM
« Reply #8 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 ;)

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV !CAR PROBLEM
« Reply #9 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.

Offline Chezor

  • Wiseguy
  • **
  • Posts: 90
  • RPG Planet Scripter
    • View Profile
    • RPG Planet
Re: WSV !CAR PROBLEM
« Reply #10 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...

Scripts: Fuel system in vehicles, Speedometer, Spawnback, Improved Copwork, Improved Jailing, Improved phone with sms, and many more. Coming soon..

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: WSV !CAR PROBLEM
« Reply #11 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

Offline evil_night13

  • Wiseguy
  • **
  • Posts: 61
  • i are a normal person like you
    • View Profile
    • web hosting
Re: WSV !CAR PROBLEM
« Reply #12 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!

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: WSV !CAR PROBLEM
« Reply #13 on: October 20, 2008, 07:38:40 pm »
Hmm I don't know why, its working fine for me.