• Welcome to Vice City Multiplayer.
 

Question

Started by Cristian, September 07, 2008, 12:27:00 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Cristian

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!


szostol

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


Cristian

I do not understand, and as is the command !forsale?


thijn

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


Cristian

if I change WSV by VCMP work?

Quote
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

Quote
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?

Quote
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

Quote
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


szostol


Cristian



szostol

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.

thijn

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



szostol

My car lock:

Quoteelseif ($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
    }
  }

Quoteelseif ($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
    }
  }
Quote
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

Quotealias vcmp.forsale !return $iif($readini(vcmp.cars.ini,COUNT,Forsale),$v1,0)
Quotealias vcmp.allcars !return $iif($readini(vcmp.cars.ini,COUNT,All),$v1,0)

Quoteelseif ($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:

Quote!writeini -n vcmp.cars.ini COUNT Forsale $calc($vcmp.forsale - 1)

To sellcar add:

Quote!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

Cristian

hmmm, vcmp.cmdcheck work ? because mine is SanSan v3


szostol

So edit what I did, I thought you're using gus.