Author Topic: Fix Commands For FBS.  (Read 3007 times)

0 Members and 1 Guest are viewing this topic.

Offline [XT]ariel[X]

  • Wiseguy
  • **
  • Posts: 58
  • Hi all!!
    • View Profile
    • American Server
Fix Commands For FBS.
« on: November 11, 2009, 02:59:00 am »
Hi all, other script for FBS :)

Code: [Select]
  elseif (fix == $3) {
    if ($vcmp.vehicle($1, $2) != 0) {
      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 $2 Please wait while your car is fixed......
      !.timer 1 7 /vcmp.setvehicleloc $1 %b %d
      !.timer 1 7 /vcmp.setvehicle $1 %b
      !.timer 1 7 /vcmp.msg $1 $2 Thank you for your patience, Your car has been fixed
    }
    else vcmp.msg $2 You can only fix Cars, Not yourself.
  }
« Last Edit: November 13, 2009, 10:27:45 pm by [XT]ariel[X] »
Clic in image from enter in my web :D

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Fix Commands For FBS.
« Reply #1 on: November 11, 2009, 05:29:31 pm »
In normal english:
Code: [Select]
    elseif (fix == $3) {
      if ($vcmp.vehicle($1, $2) != 0) {
        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 %b 1 1 1
        vcmp.setvehiclehealth %b 1000
        vcmp.msg $2 Please wait while your car is fixed......
        !.timer 1 7 /vcmp.setvehicleloc %b %d
        !.timer 1 7 /vcmp.setvehicle $1 $2 %b
        !.timer 1 7 /vcmp.msg $1 $2 Thank you for your patience, Your car has been fixed
      }
      else vcmp.msg $2 You can only fix Cars, Not yourself.
    }

EDIT: I think this code doesn't work because you do not specify the server ID in the setvehicleloc & health
« Last Edit: November 11, 2009, 05:31:11 pm by thijn »

Offline [XT]ariel[X]

  • Wiseguy
  • **
  • Posts: 58
  • Hi all!!
    • View Profile
    • American Server
Re: Fix Commands For FBS.
« Reply #2 on: November 11, 2009, 10:19:13 pm »
oooo, thanks thinj
Clic in image from enter in my web :D

Offline [XT]ariel[X]

  • Wiseguy
  • **
  • Posts: 58
  • Hi all!!
    • View Profile
    • American Server
Re: Fix Commands For FBS.
« Reply #3 on: November 11, 2009, 10:46:36 pm »
Scripts Errors. :P
Script Good:

Code: [Select]
  elseif (fix == $3) {
    if ($vcmp.vehicle($1, $2) != 0) {
      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 $2 Please wait while your car is fixed......
      !.timer 1 7 /vcmp.setvehicleloc $1 %b %d
      !.timer 1 7 /vcmp.setvehicle $1 %b
      !.timer 1 7 /vcmp.msg $1 $2 Thank you for your patience, Your car has been fixed
    }
    else vcmp.msg $2 You can only fix Cars, Not yourself.
  }
Clic in image from enter in my web :D

Offline Javi

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 149
    • View Profile
Re: Fix Commands For FBS.
« Reply #4 on: November 15, 2009, 04:26:24 pm »
Thank you! Worked fine  ;)