• Welcome to Vice City Multiplayer.
 

WSV !CAR PROBLEM

Started by gamyster, October 14, 2008, 10:10:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gamyster

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
Founder of [SAF]Clan

thijn



gamyster

i dont know why but i cant find the car script in WSV!
Founder of [SAF]Clan

gamyster

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

There is a slight problem with the !car script.
Please use the one below;


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.

Tamas

#5
Heres mine it works perfectly. And uses the same style what LW have (i think that is the most clearable.)

Code:
Quoteelseif (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:
Quotealias 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
}

gamyster

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

Chezor

Quote from: gamyster on October 14, 2008, 06: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

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..

thijn

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 ;)


Tamas

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.

Chezor

Quote from: [SRS]Tomi on October 14, 2008, 10: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.

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..

evil_night13

Quote from: Chezor on October 15, 2008, 08:17:08 AM
Quote from: [SRS]Tomi on October 14, 2008, 10: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.

Everyone have their own style you know...

yeah , ur both ideas sounds good! :D

evil_night13

Quote from: [SRS]Tomi on October 14, 2008, 03:37:34 PM
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!

Tamas

Hmm I don't know why, its working fine for me.