• Welcome to Vice City Multiplayer.
 

Nedd help in WSV.........

Started by Punjabi, September 14, 2008, 05:22:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Punjabi

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

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

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.


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.

Punjabi

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

Tamas


Punjabi

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