Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Cristian on September 07, 2008, 02:27:00 pm
-
Hi,
Question:
1? there is a !lockcar and a !unlockcar for SanSan v3 ? as is the script?
2? There is a command to know: how many cars there are sold, how many there are prop sold, how many cars there are in total, how many there are in total prop? as is the script?
thanks for your reply!
-
1* make it your self, you have example with lockcar for wsv in next topic
2* Count how many cars you have in map, write ti in some ini file like cars.ini
[CARS]
total=177
forsale=177
and add to buycar command line wich - 1 from forsale and to sell command + 1 to forsale, then make alias wich read from file how much cars are for sale and how much are total
-
I do not understand, and as is the command !forsale?
-
something like:
alias:
alias vcmp.forsale.car !return $readini(vcmp.forsale.ini,FORSALE,car)
add in vcmp.forsale.ini:
[FORSALE]
cars=Numbers of cars for sale
then add in !buycar:
var %forsale = $calc($vcmp.forsale.car - 1)
!writeini -n vcmp.forsale.ini FORSALE car %forsale
NOTE: UNSTESTED
-
if I change WSV by VCMP work?
alias WSV.lockcar {
var %car = $WSV.vehicle($2)
if ($WSV.name($2) isin $WSV.carowners(%car)) {
WSV.setvehiclestatus %car 1
WSV.msg $2 Your Car is Locked..
}
}
by
alias vcmp.lockcar {
var %car = $vcmp.vehicle($2)
if ($vcmp.name($2) isin $vcmp.carowners(%car)) {
vcmp.setvehiclestatus %car 1
vcmp.msg $2 Your Car is Locked..
}
}
ahy be changed or something else?
alias WSV.unlockcar {
var %car = $WSV.vehicle($2)
if ($WSV.name($2) isin $WSV.carowners(%car)) {
WSV.setvehiclestatus %car 0
WSV.msg $2 Your Car is unLocked..
}
by
alias vcmp.unlockcar {
var %car = $vcmp.vehicle($2)
if ($vcmp.name($2) isin $vcmp.carowners(%car)) {
vcmp.setvehiclestatus %car 0
vcmp.msg $2 Your Car is unLocked..
}
thank for your reply
-
Nope, it won't work.
-
hmmmm ok
-
What script are you basing on? I will do it in defiance of my-self and make it for you if you need it for gus.
-
try:
Alias:
alias vcmp.lockdoors dll rcondll.dll RconCommand set 3 $1-
Command:
!lock
elseif ($2 == !lock) || {
if ($vcmp.cmdcheck(!lockcar,%id) == fail) !halt
else {
vcmp.lockdoors $vcmp.vehicle(%id,id) 4
vcmp.msg %id You have just locked your vehicle
}
}
!unlock:
elseif ($2 == !lock) || {
if ($vcmp.cmdcheck(!lock,%id) == fail) !halt
else {
vcmp.lockdoors $vcmp.vehicle(%id,id) 0
vcmp.msg %id You have just unlocked your vehicle
}
}
-
My car lock:
elseif ($2 == !lockcar) || ($2 == !pmlockcar) {
if ($vcmp.cmdcheck(!lockcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Invalid command useage
elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id You aren't owner of this vechicle
else {
vcmp.lockdoors $3 4
vcmp.msg %id You have just locked your vehicle
}
}
elseif ($2 == !unlockcar) || ($2 == !pmunlockcar) {
if ($vcmp.cmdcheck(!unlockcar,%id) == fail) !halt
elseif (!$3) vcmp.msg %id Invalid command useage
elseif ($3 !isnum) vcmp.msg %id Error - Invalid Vehicle ID, $2 <car id>
elseif ($vcmp.carowner($3) != %name) vcmp.msg %id You aren't owner of this vechicle
else {
vcmp.lockdoors $3 0
vcmp.msg %id You have just unlocked your vehicle
}
}
alias vcmp.lockdoors dll rcondll.dll RconCommand set 3 $1-
Cars count:
1. Crate file vcmp.car.ini
2. Make there [COUNT]
3. Under it write All=how much vehicles are on map
4. Under it write Forsale=how much vehicles are on map
alias vcmp.forsale !return $iif($readini(vcmp.cars.ini,COUNT,Forsale),$v1,0)
alias vcmp.allcars !return $iif($readini(vcmp.cars.ini,COUNT,All),$v1,0)
elseif ($2 == !forsale) {
if ($vcmp.cmdcheck(!mycars,%id) == fail) !halt
else {
vcmp.msg %id Total vehicles: $vcmp.allcars For sale vehicles: $vcmp.forsale
}
}
To buycar add:
!writeini -n vcmp.cars.ini COUNT Forsale $calc($vcmp.forsale - 1)
To sellcar add:
!writeini -n vcmp.cars.ini COUNT Forsale $calc($vcmp.forsale +1)
If wouldn't work add change $vcmp.forsale to $vcmp.forsale(%b) and same with $vcmp.allcars
NOTE: Untested
-
hmmm, vcmp.cmdcheck work ? because mine is SanSan v3
-
So edit what I did, I thought you're using gus.