[LB]Darkness requested me for a license script so i have done for him..here it is minor bugs can be here but will work..[GUS]..
Here the script how u can get ur driving license..
elseif ($2 == !getlicense) {
if (Sunshine-Autos !isin $vcmp.area(%b)) vcmp.msg %id Error - You have to be at the Sunshine Autos!
elseif ($vcmp.cost(%b) > $vcmp.cash(%b)) vcmp.msg %id Error - You need atleast $ $+ $bytes($vcmp.cost(%b),b) to use this command
else {
.timer 1 1 vcmp.setcont %id 0
.timer 1 1 vcmp.announce %id ~y~Please wait..
.timer 1 2 vcmp.cash- %b $vcmp.cost(%b)
!writeini -n vcmp.license.ini LICENSE %name yes
.timer 1 3 vcmp.msg $2 You can now drive vehicles...
.timer 1 3 vcmp.announce %id ~y~Got a License!
.timer 1 3 vcmp.setcont %id 1
}
}
And License identifier..
on *:SIGNAL:vcmp.enter:{
var %name = $1
var %id = $vcmp.getid($1)
var %Entertype = $4
if ( %EnterType == 16) vcmp.msg %id Entered Vehicle as a driver..
if ($readini(vcmp.license.ini,LICENSE,%name) == yes) {
vcmp.msg %id You can drive vehicle,you have driving license..
}
else vcmp.msg %id You dont got driving license..
vcmp.setlocation %id $vcmp.location(%id)
}
}
}
-------------------------------
Location:
-------------------------------
-1013.792,-862.95,17.954=SunShine-Autos
Note:Untested
Thanks
Amenine
Thank You very Much :)
You welcome.. :D
Nice but how do i get it to my Server?
Just add it into ur GUS script
And what its will do?
Quote from: Amenine on January 05, 2009, 01:18:45 PM
[LB]Darkness requested me for a license script so i have done for him..here it is minor bugs can be here but will work..[GUS]..
Here the script how u can get ur driving license..
elseif ($2 == !getlicense) {
if (Sunshine-Autos !isin $vcmp.area(%b)) vcmp.msg %id Error - You have to be at the Sunshine Autos!
elseif ($vcmp.cost(%b) > $vcmp.cash(%b)) vcmp.msg %id Error - You need atleast $ $+ $bytes($vcmp.cost(%b),b) to use this command
else {
.timer 1 1 vcmp.setcont %id 0
.timer 1 1 vcmp.announce %id ~y~Please wait..
.timer 1 2 vcmp.cash- %b $vcmp.cost(%b)
!writeini -n vcmp.license.ini LICENSE %name yes
.timer 1 3 vcmp.msg $2 You can now drive vehicles...
.timer 1 3 vcmp.announce %id ~y~Got a License!
.timer 1 3 vcmp.setcont %id 1
}
}
And License identifier..
on *:SIGNAL:vcmp.enter:{
var %name = $1
var %id = $vcmp.getid($1)
var %Entertype = $4
if ( %EnterType == 16) vcmp.msg %id Entered Vehicle as a driver..
if ($readini(vcmp.license.ini,LICENSE,%name) == yes) {
vcmp.msg %id You can drive vehicle,you have driving license..
}
else vcmp.msg %id You dont got driving license..
vcmp.setlocation %id $vcmp.location(%id)
}
}
}
-------------------------------
Location:
-------------------------------
-1013.792,-862.95,17.954=SunShine-Autos
Note:Untested
Thanks
Amenine
Okay now there are some problems with this so let me help you out!
Command
elseif ($2 == !getlicense) {
if (Sunshine-Autos !isin $vcmp.area(%b)) vcmp.msg %id Error - You have to be at the Sunshine Autos!
elseif ($vcmp.cost(%b) > $vcmp.cash(%b)) vcmp.msg %id Error - You need atleast $ $+ $bytes($vcmp.cost(%b),b) to use this command
else {
.timer 1 1 vcmp.setcont %id 0
.timer 1 1 vcmp.announce %id ~y~Please wait..
.timer 1 2 vcmp.cash- %b $vcmp.cost(%b)
!writeini -n vcmp.license.ini LICENSE %name yes
.timer 1 3 vcmp.msg $2 You may now drive vehicles...
.timer 1 3 vcmp.announce %id ~y~Received a License!
.timer 1 3 vcmp.setcont %id 1
}
}
And License identifier..
on *:SIGNAL:vcmp.enter:{
var %name = $1
var %id = $vcmp.getid($1)
var %Entertype = $4
if ( %EnterType == 16) vcmp.msg %id Entered Vehicle as a driver..
if ($readini(vcmp.license.ini,LICENSE,%name) == yes) {
vcmp.msg %id Driving this vehicle as a legal driver.
}
else {
vcmp.msg %id You have no driver's license.
vcmp.setlocation %id $vcmp.location(%id)
}
just 1 small qeustion. if i press scripts editor -> remote. i just copy and paste the codes somewhere? or in a special section? plz help
You need to put in a special part of the script:
On the SIGNAL:vcmp.enter [on *:SIGNAL:vcmp.enter:{] put this:
var %name = $1
var %id = $vcmp.getid($1)
var %Entertype = $4
if ( %EnterType == 16) vcmp.msg %id Entered Vehicle as a driver..
if ($readini(vcmp.license.ini,LICENSE,%name) == yes) {
vcmp.msg %id You can drive vehicle,you have driving license..
}
else vcmp.msg %id You dont got driving license..
vcmp.setlocation %id $vcmp.location(%id)
}
}
}
And on the SIGNAL:vcmp.command [on *:SIGNAL:vcmp.command:{] put this:
elseif ($2 == !getlicense) {
if (Sunshine-Autos !isin $vcmp.area(%b)) vcmp.msg %id Error - You have to be at the Sunshine Autos!
elseif ($vcmp.cost(%b) > $vcmp.cash(%b)) vcmp.msg %id Error - You need atleast $ $+ $bytes($vcmp.cost(%b),b) to use this command
else {
.timer 1 1 vcmp.setcont %id 0
.timer 1 1 vcmp.announce %id ~y~Please wait..
.timer 1 2 vcmp.cash- %b $vcmp.cost(%b)
!writeini -n vcmp.license.ini LICENSE %name yes
.timer 1 3 vcmp.msg $2 You can now drive vehicles...
.timer 1 3 vcmp.announce %id ~y~Got a License!
.timer 1 3 vcmp.setcont %id 1
}
}
I can't get the ! command to work! what am i doing wrong?
/}}if: not connected to server (line 327, vcmp.rpg.mrc)
Invalid parameters: $inpoly (line 701, vcmp.mrc)
and for WSV?? :D