Author Topic: some has a !repair command for FBS?  (Read 3235 times)

0 Members and 1 Guest are viewing this topic.

Offline [DGC]Doomer

  • Wiseguy
  • **
  • Posts: 64
    • View Profile
some has a !repair command for FBS?
« on: January 10, 2010, 10:10:33 am »
some has a !repair command for FBS?

Lucky_Killer

  • Guest
Re: some has a !repair command for FBS?
« Reply #1 on: January 10, 2010, 10:50:46 am »
 
Code: [Select]
elseif (fix == $3) {
  if ($vcmp.vehicle($1, $2) = 0) vcmp.msg $1 $2 You can only fix vehicles! Not yourself!
  elseif ($FBS.CarOwner($vcmp.vehicle($1, $2)) == $vcmp.name($1, $2)) {
    var %a = 0
    var %b = $vcmp.vehicle($1, $2),%c = $vcmp.location($1, $2),%d = $vcmp.location($1, $2).x $vcmp.location($1, $2).y $calc($vcmp.location($1, $2).z - 1.12)
    vcmp.setlocation $1 $2 %c %a
    vcmp.setvehicleloc $1 %b 1 1 1
    vcmp.setvehiclehealth $1 %b 1000
    vcmp.msg $1 $2 Please wait while we fix your car...
    !.timer 1 7 /vcmp.setvehicleloc $1 %b %d
    !.timer 1 7 /vcmp.setvehicle $1 $2 %b
    !.timer 1 7 /vcmp.msg $1 $2 Thank you for your patience. You car has been fixed.
  }
  elseif ($FBS.CarOwner($vcmp.vehicle($1, $2)) == $vcmp.name($1, $2)) {     
    var %a = 0
    var %b = $vcmp.vehicle($1, $2),%c = $vcmp.location($1, $2),%d = $vcmp.location($1, $2).x $vcmp.location($1, $2).y $calc($vcmp.location($1, $2).z - 1.12)
    vcmp.setlocation $1 $2 %c %a
    vcmp.setvehicleloc $1 %b 1 1 1
    vcmp.setvehiclehealth $1 %b 1000
    vcmp.msg $1 $2 Please wait while we fix your car...
    !.timer 1 7 /vcmp.setvehicleloc $1 %b %d
    !.timer 1 7 /vcmp.setvehicle $1 $2 %b
    !.timer 1 7 /vcmp.msg $1 $2 Thank you for your patience. You car has been fixed.
  }
  else {
    vcmp.msg $1 $2 You do not own or share this vehicle
  }
}
« Last Edit: January 10, 2010, 10:54:01 am by Lucky_Killer »

Offline Kill3R

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 28
  • uhm... iam n00b, what to type here???
    • View Profile
    • Hunting-Arena
Re: some has a !repair command for FBS?
« Reply #2 on: January 10, 2010, 03:23:01 pm »
i guess it need not be, that much complicated  :)

; When player is in the vehicle
elseif ($3 == repair) {
if ($vcmp.vehicle($1, $2) == 0) vcmp.msg $1 $2 You need to be in a vehicle
else {
vcmp.setvehiclehealth $1 $vcmp.vehicle($1, $2) 1000.0000
vcmp.msg $1 $2 Your vehilce has been repaired
   }
}

; When the player is not in the vehicle
elseif  ($3 == repair) {
if (!$4) vcmp.msg $1 $2 Syntax : /c $3 <CarID>
else {
vcmp.setvehiclehealth $1 $4 1000.0000
vcmp.msg $1 $2 CarID $chr(40) $4 ) has been repaired
   }
}
« Last Edit: January 10, 2010, 03:28:25 pm by Kill3R »

Regards,
Kill3R

Offline [DGC]Doomer

  • Wiseguy
  • **
  • Posts: 64
    • View Profile
Re: some has a !repair command for FBS?
« Reply #3 on: January 11, 2010, 10:11:20 pm »
thanks man you saved some players with ur script