Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: [XT]ariel[X] on November 11, 2009, 02:59:00 am

Title: Fix Commands For FBS.
Post by: [XT]ariel[X] 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.
  }
Title: Re: Fix Commands For FBS.
Post by: thijn 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
Title: Re: Fix Commands For FBS.
Post by: [XT]ariel[X] on November 11, 2009, 10:19:13 pm
oooo, thanks thinj
Title: Re: Fix Commands For FBS.
Post by: [XT]ariel[X] 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.
  }
Title: Re: Fix Commands For FBS.
Post by: Javi on November 15, 2009, 04:26:24 pm
Thank you! Worked fine  ;)