<--------------------------------Gus Script----------------------------------->
elseif ($2 == !car) || ($2 == !pmcar) {
if ($vcmp.cmdcheck(!car,%id) == fail) !halt
elseif (%a == -1) vcmp.msg %id Absent ID/Name
elseif ($vcmp.vehicle(%a,id) == 0) vcmp.msg %id $vcmp.name(%a) car is currently on foot!
else vcmp.msg %id Vehicle - Name: $+($chr(91),$vcmp.carname($vcmp.vehicle(%a,id)),$chr(93)) ID: $+($chr(91),$vcmp.vehicle(%a,id),$chr(93)) Price: $+($chr(91),$vcmp.vehiclecost($vcmp.vehicle(%a,id)),$chr(93)) Owner: $+($chr(91),$vcmp.carowner($vcmp.vehicle(%a,id)),$chr(93))
}
elseif ($2 == !buycar) {
if ($vcmp.cmdcheck(!buycar,%id) == fail) !halt
elseif (Sunshine Autos !isin $vcmp.area(%b)) vcmp.msg %id To Buy A Car Deves Be Sunshine In Cars!!
elseif ($vcmp.vehicle(%a,id) == 0) vcmp.msg %id
elseif ($vcmp.carowner($vcmp.vehicle(%a,id)) != Sunshine Autos) vcmp.msg %id This vehicle is owned by $vcmp.carowner($vcmp.vehicle(%a,id))
elseif ($vcmp.vehiclecost($vcmp.vehicle(%a,id)) > $vcmp.cash(%id)) vcmp.msg %id You need atleast $ $+ $vcmp.vehiclecost($vcmp.vehicle(%a,id))
else {
vcmp.cash- %b $vcmp.vehiclecost($vcmp.vehicle(%a,id))
!writeini -n vcmp.cars.ini OWNERS $vcmp.vehicle(%a,id) $vcmp.name(%id)
vcmp.msg %id You have just bought $+($chr(91),$vcmp.carname($vcmp.vehicle(%a,id)),$chr(93)) ID: $+($chr(91),$vcmp.vehicle(%a,id),$chr(93)) Price: $+($chr(91),$vcmp.vehiclecost($vcmp.vehicle(%a,id)),$chr(93))
}
}
elseif ($2 == !sellcar) {
if ($vcmp.cmdcheck(!sellcar,%id) == fail) !halt
elseif (Sunshine Autos !isin $vcmp.area(%b)) vcmp.msg %id To Sell A Must Be In Order To Sunshine Or Make One Admin The Leasehold Landlord
elseif ($vcmp.vehicle(%a,id) == 0) vcmp.msg %id You Have No Car No!
elseif ($vcmp.carowner($vcmp.vehicle(%a,id)) != %name) vcmp.msg %id You Can not Buy This Car Has Owner
else {
!writeini -n vcmp.cars.ini OWNERS $vcmp.vehicle(%a,id) Sunshine Autos
vcmp.cash+ %b $calc($vcmp.vehiclecost($vcmp.vehicle(%a,id)) * 0.55)
vcmp.msg %id You have sold your vehicle with price $ $+ $calc($vcmp.vehiclecost($vcmp.vehicle(%a,id)) * 0.55)
}
}
elseif ($2 == !getcar) || ($2 == !pmgetcar) {
if ($vcmp.cmdcheck(!getcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <car id>
elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id Your not the owner of this car!
else {
vcmp.setvehicleloc $3 $hget(vcmp,%id $+ .xyz)
.timer -m 1 400 vcmp.setvehicle %id $3
}
}
elseif ($2 == !cardive) || ($2 == !pmgetcar) {
if ($vcmp.cmdcheck(cardivegetcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Missing Information, $2 <car id>
elseif ($3 !isnum) vcmp.msg %id Invalid Vehicle ID, $2 <car id>
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id You are not the owner of this car, go and buy one!
else {
vcmp.msg %id
vcmp.setvehicleloc $3 $hget(vcmp,%id $+ .x) $hget(vcmp,%id $+ .y) $calc($hget(vcmp,%id $+ .z) + 700)
.timer -m 1 400 vcmp.set 9 %id $3
}
}
elseif ($2 == !lockcar) || ($2 == !pmlockcar) {
if ($vcmp.cmdcheck(!lockcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <car id>
elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id You are not the owner of this car
else {
vcmp.lockdoors $3 4
vcmp.msg %id **Car Locked
}
}
elseif ($2 == !unlockcar) || ($2 == !pmunlockcar) {
if ($vcmp.cmdcheck(!unlockcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Error - Missing Information, $2 <car id>
elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id You are not the owner of this car
else {
vcmp.lockdoors $3 0
vcmp.msg %id **Car Unlocked }
}
<----------------------------Sansan Script-------------------------------->
Command !Car:
elseif ($2 == !car) {
var %p = $iif($3,$v1,%id)
if ( $vcmp.hgetcarid(%id) = 0 ) {
vcmp.adminmsg %id You are Currently on Foot
!halt
}
elseif ($vcmp.nameid(%p) != $null) vcmp.adminmsg %id Vehicle Status: Model:[ $vcmp.carsnames($vcmp.hgetcarid(%id)) ] ID:[ $vcmp.carsids($vcmp.hgetcarid(%id)) ] Hp:[ $vcmp.hgetcarhp(%id) ]
vcmp.adminmsg %id Owner:[ $vcmp.carsowners($vcmp.hgetcarid(%id)) ] Price:[ $ $+ $vcmp.carsprices($vcmp.hgetcarid(%id)) ] Share:[ $vcmp.carsshares($vcmp.hgetcarid(%id)) ]
else vcmp.adminmsg %id Error: Invalid ID.
}
Command !Mycars:
elseif ($2 == !mycars) {
var %a = 0,%b = 0,%c = 0,%d
while (%a < $ini(vcmp.cars.ini,OWNERS,0)) {
%b = $readini(vcmp.cars.ini,OWNERS,$ini(vcmp.cars.ini,OWNERS,%a))
%c = %b
%d = $ini(vcmp.cars.ini,OWNERS,%a)
!inc %a
if (%c == $vcmp.hgetname(%id)) vcmp.adminmsg %id Mycars:[ $vcmp.carsnames(%d) ( %d ) ]
}
}
Command !Buycar:
elseif ($2 == !buycar) {
if ( $vcmp.hgetcarid(%id) = 0 ) {
vcmp.adminmsg %id You are Currently on Foot
!halt
}
if (Sunshine-Autos-Viceport-Vice-City-Mainland !isin $vcmp.playerarea(%id)) {
vcmp.adminmsg %id Error - You Must Be in Sunshine-Autos To Buy a Car!
!halt
}
elseif ( $vcmp.carsowners($vcmp.hgetcarid(%id)) != Sunshine-Autos ) {
vcmp.adminmsg %id Error - This Vehicle is already Owned.
!halt
}
elseif ($hget(mycars, $vcmp.hgetname(%id)) >= 2) vcmp.adminmsg %id Error, you have reached your car limit.
elseif ( $vcmp.carsprices($vcmp.hgetcarid(%id)) > $vcmp.hgetmoney(%id)) {
vcmp.adminmsg %id Error - You need atleast $ $+ $vcmp.carsprices($vcmp.hgetcarid(%id)) to buy this vehicle.
!halt
}
else {
!writeini vcmp.cars.ini OWNERS $vcmp.hgetcarid(%id) $vcmp.hgetname(%id)
vcmp.adminmsg %id Bought Car!
var %cars = $hget(myCars, $vcmp.hgetname(%id))
!hadd -m myCars $vcmp.hgetname(%id) $calc(%cars +1)
vcmp.setmon %id $calc($vcmp.hgetmoney(%id) - $vcmp.carsprices($vcmp.hgetcarid(%id)))
}
}
Commands !Sellcar:
elseif ($2 == !sellcar) {
var %money = $calc($vcmp.carsprices($vcmp.hgetcarid(%id)) /2 )
var %cars = $hget(mycars, $vcmp.hgetname(%id))
if ( $vcmp.hgetcarid(%id) = 0 ) {
vcmp.adminmsg %id You are Currently on Foot
!halt
}
if (Sunshine-Autos-Viceport-Vice-City-Mainland !isin $vcmp.playerarea(%id)) {
vcmp.adminmsg %id Error - You Must Be in Sunshine-Autos To Sell a Car!
!halt
}
elseif ( $vcmp.carsowners($vcmp.hgetcarid(%id)) != $vcmp.hgetname(%id) ) {
vcmp.adminmsg %id Error - This is not your Vehicle.
!halt
}
else {
!writeini vcmp.cars.ini OWNERS $vcmp.hgetcarid(%id) Sunshine-Autos
!hadd -m mycars $vcmp.hgetname(%id) $calc(%cars -1)
if ($hget(mycars, $vcmp.hgetname(%id)) == 0 ) !hdel mycars $vcmp.hgetname(%id)
vcmp.adminmsg %id Sold Car!
vcmp.setmon %id $calc($vcmp.hgetmoney(%id) + %money)
}
}
Command !Getcar:
Command !Getcar:
elseif ($2 == !getcar) {
if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must be on foot to use the <!Getcar> Command.
elseif (!$3) vcmp.adminmsg %id Error - Missing Information, $2 <ID>
elseif ($3 !isnum) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif (. isin $3) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif ($3 > 140) || ($3 < 0) vcmp.adminmsg %id Error: Invalid Vehicle ID.
elseif (+ isin $3) || (- isin $3) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif ( $vcmp.carsowners($3) != $vcmp.hgetname(%id)) vcmp.adminmsg %id Error - You Dont have Keys To this Vehicle.
else {
vcmp.setcarloc $3 $calc($vcmp.hgetpos.x(%id) + 2) $calc($vcmp.hgetpos.y(%id) + 2) $calc($vcmp.hgetpos.z(%id) - 1)
vcmp.adminmsg %id Spawning Car:[ $3 $+ ]
}
if ($vcmp.hgetcarid(%id) != 0) vcmp.adminmsg %id You must be on foot to use the <!Getcar> Command.
elseif (!$3) vcmp.adminmsg %id Error - Missing Information, $2 <ID>
elseif ($3 !isnum) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif (. isin $3) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif ($3 > 140) || ($3 < 0) vcmp.adminmsg %id Error: Invalid Vehicle ID.
elseif (+ isin $3) || (- isin $3) vcmp.adminmsg %id $2 $+ , Invalid Vehicle ID.
elseif ( $vcmp.carsshares($3) != $vcmp.hgetname(%id)) vcmp.adminmsg %id Error - You Dont have Keys To this Vehicle.
else {
vcmp.setcarloc $3 $calc($vcmp.hgetpos.x(%id) + 2) $calc($vcmp.hgetpos.y(%id) + 2) $calc($vcmp.hgetpos.z(%id) - 1)
vcmp.adminmsg %id Spawning Car:[ $3 $+ ]
}
}
Command !Sharecar:
elseif ($2 == !sharecar) {
if ( $vcmp.hgetcarid(%id) = 0 ) {
vcmp.adminmsg %id You are Currently on Foot
!halt
}
elseif ( $vcmp.carsshares($vcmp.hgetcarid(%id)) != None ) {
vcmp.adminmsg %id Error - This Vehicle is Already Shared.
!halt
}
elseif ( $vcmp.carsowners($vcmp.hgetcarid(%id)) != $vcmp.hgetname(%id) ) {
vcmp.adminmsg %id Error - This is not your Vehicle.
!halt
}
else {
!writeini vcmp.cars.ini SHARE $vcmp.hgetcarid(%id) $vcmp.hgetname($vcmp.nameid($3))
vcmp.adminmsg %id Shared Car!
}
}
Command !DelSharecar:
Code:
elseif ($2 == !delsharecar) {
if ( $vcmp.hgetcarid(%id) = 0 ) {
vcmp.adminmsg %id You are Currently on Foot
!halt
}
elseif ( $vcmp.carsowners($vcmp.hgetcarid(%id)) != $vcmp.hgetname(%id) ) {
vcmp.adminmsg %id Error - This is not your Vehicle.
!halt
}
else {
!writeini vcmp.cars.ini SHARE $vcmp.hgetcarid(%id) $vcmp.hgetname($vcmp.nameid($3)) None
vcmp.adminmsg %id Deleted Share Car!
}
}
Please Create New File In Script Name:
1.- vcmp.owners in vcmp.owner:
Code:
[OWNERS]
13=Sunshine Autos
10=Sunshine Autos
145=Sunshine Autos
148=Sunhine Autos
146=Sunshine Autos
45=Sunshine Autos
25=Sunshine Autos
2=Sunshine Autos
149=Sunshine Autos
126=Sunshine Autos
110=Sunshine Autos
97=Sunshine=Autos
52=Sunshine Autos
27=Sunshine Autos
151=Sunshine Autos
44=Sunshine Autos
100=Sunshine Autos
101=Sunshine Autos
15=Sunshine Autos
73=Sunshine Autos
152=Sunshine Autos
2.- New File Name: vcmp.myCars
3.- New File Name: vcmp.cars in vcmp.cars
Code:
[PRICES]
1=75000
2=75000
3=75000
4=75000
5=75000
6=75000
7=75000
8=75000
9=1500000
10=300000
11=1200000
12= etc etc
[ID] ( is id you cars )
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
10=10
11=11
[OWNERS] ( owner id 1= etc is empy no modific )
1=
2=
3=
4=
5=
6=
7=
8=
9=
10=
11=
12=
[NAMES] ( and all name car's )
1=Washington
2=Angel
3=Angel
4=Angel
5=Angel
:PI hpe this will help u
Thnaks Punjabi_goli