Author Topic: WSV License ...  (Read 3073 times)

0 Members and 1 Guest are viewing this topic.

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
WSV License ...
« on: October 04, 2008, 04:01:40 pm »
Not working even license or Vehicleenter..

Code: [Select]
elseif ($3 == getlicense) {
  if (Sunshine isin $WSV.loco($2)) {
    if ($WSV.money($1) >= 2000) {
      hdec WSV.money $WSV.name($2) 2000
      WSV.setcash $2 $WSV.money($2)
      set %license. [ $+ [ $WSV.name($2) ] ] Yes
      WSV.msg $2 You can now drive vehicles...
      WSV.announce $2 ~o~Got a License!
    }
    else WSV.msg $2 You need at least [2000] to buy your license..
  }
  else WSV.msg $2 You need to be at Sunshine Autos!
}

Code: [Select]
on *:SIGNAL:WSV.vehicleenter: {
  var %car = $hget(WSV.Config.Cars,$3) ( $+ $3 $+ )
  if ([ %license. [ $+ [ $WSV.name($2) ] ] ]) {
    WSV.msg $2 You do not have a license!
    .timer 1 3 WSV.setlocation $2 $WSV.location($2)
  }
  elseif ($5 == 18) WSV.msg $2 You have started to drive a %car $+ .
  elseif ($5 == 17) {
    var %a = 0
    while (%a <= %maxplayers) {
      if ($WSV.vehicle(%a) == $3) && ($WSV.vehicle(%a) != 0) && (%a != $2) var %b = $WSV.getname(%a)
      inc %a
    }
    WSV.msg $2 You got onto %b $+ ' $+ s %car $+ .
    set % [ $+ [ passenger $+ . $+ [ $WSV.getname($2) ] ] ] $3
  }
}

Cya
Punjabi_goli
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Windlord

  • Guest
Re: WSV License ...
« Reply #1 on: October 05, 2008, 10:06:14 am »
Code: [Select]
elseif ($3 == getlicense) {
  if (Sunshine isin $WSV.loco($2)) {
    if ($WSV.money($2) >= 2000) {
      hdec WSV.money $WSV.name($2) 2000
      WSV.setcash $2 $WSV.money($2)
      set %license. [ $+ [ $WSV.name($2) ] ] Yes
      WSV.msg $2 You can now drive vehicles...
      WSV.announce $2 ~o~Got a License!
    }
    else WSV.msg $2 You need at least [2000] to buy your license..
  }
  else WSV.msg $2 You need to be at Sunshine Autos!
}

Code: [Select]
on *:SIGNAL:WSV.vehicleenter: {
  var %car = $hget(WSV.Config.Cars,$3) ( $+ $3 $+ )
  if (! [ $+ [ %license. [ $+ [ $WSV.name($2) ] ] ] ]) {
    WSV.msg $2 You do not have a license!
    .timer 1 3 WSV.setlocation $2 $WSV.location($2)
  }
  elseif ($5 == 18) WSV.msg $2 You have started to drive a %car $+ .
  elseif ($5 == 17) {
    var %a = 0
    while (%a <= %maxplayers) {
      if ($WSV.vehicle(%a) == $3) && ($WSV.vehicle(%a) != 0) && (%a != $2) var %b = $WSV.getname(%a)
      inc %a
    }
    WSV.msg $2 You got onto %b $+ ' $+ s %car $+ .
    set % [ $+ [ passenger $+ . $+ [ $WSV.getname($2) ] ] ] $3
  }
}

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: WSV License ...
« Reply #2 on: October 07, 2008, 01:33:16 pm »
Great it works but problem arises even i get license i cant able to sit in car......
any problem?? :-[
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>