Author Topic: Nedd help in WSV.........  (Read 3246 times)

0 Members and 1 Guest are viewing this topic.

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Nedd help in WSV.........
« on: September 14, 2008, 06:22:51 am »
Hi friends and i know there are excellent scripters who can help me in making commands like !licence.
It includes that u have to buy a licence of car than only u can drive...
Something like driving licence...and only owner can give the licence..
If have any ideas plz reply waiting for your answer........

Thanks for Reply.... ::) ::)
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Windlord

  • Guest
Re: Nedd help in WSV.........
« Reply #1 on: September 14, 2008, 07:54:25 am »
A license script can be easily made.
It used to be in v0.1 but players got mad about having to run to sunshine autos.

1. You need to check if a person has a license. This can be checked on the signal WSV.vehicleenter

2. The check has to be done by a value saved in an ini or var.
Code: (ini) [Select]
[License]
[Ka]Windlord=Yes
[Ka]Juppi=Yes
Code: (var) [Select]
%license.[Ka]Windlord Yes
%license.[Ka]Juppi Yes

3. Buying a license would be adding those ini/var/hash values.

Note: the following scripts have not been tested
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
  }
}
The above would check if someone has a license.

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

PS. I know it's hard to learn as a newbie but please try and look through the scripts and learn from it.

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Nedd help in WSV.........
« Reply #2 on: September 14, 2008, 02:25:09 pm »
Thanks very much you helped me a lot...
But i dont understand one thing this__>

1. You need to check if a person has a license. This can be checked on the signal WSV.vehicleenter

2. The check has to be done by a value saved in an ini or var.

Code: (ini)
[license]
[Ka]Windlord=Yes
[Ka]Juppi=Yes

Code: (var)
%license.[Ka]Windlord Yes
%license.[Ka]Juppi Yes

3. Buying a license would be adding those ini/var/hash values.
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>

Offline Tamas

  • Made Man
  • ***
  • Posts: 127
    • View Profile
    • http://www.tamasnet.eu/
Re: Nedd help in WSV.........
« Reply #3 on: September 15, 2008, 12:03:44 am »
Nice script Wind  ;D

Offline Punjabi

  • Made Man
  • ***
  • Posts: 147
  • Config Editor
    • View Profile
    • PUN Clan
Re: Nedd help in WSV.........
« Reply #4 on: September 15, 2008, 07:04:16 pm »
Hey windlord plz reply so that i can learn more about WSV scripting
Thanks for ur replying
 ;)
GOD BLESS ALL..<<Founder of PUN Clan.....Born to fight and Kill..>>