Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: Amenine on December 19, 2008, 09:08:06 PM

Title: Gus (Markers)
Post by: Amenine on December 19, 2008, 09:08:06 PM
Hya Guys,

I have a question..
How can i set markers in GUS script..
Like ..!!
vcmp.setdestination x y z.........? Like this...but where to paste it under spawn signal or what..and i want that markers will be like this..
Money=C
Mailbu Club=M
Sunshine Autos=S

Example=Like in real vicecity....?? :-\

Thanks
Amenine
Title: Re: Gus (Markers)
Post by: youlikethaaaat on December 20, 2008, 02:16:31 AM
alias vcmp.destination.addall {
  var %a = 1, %b = 1
  %t = $vcmp.readini(vcmp.destinations.ini,TOTALL,TOTALL)
  while (%a <= %t) {
    if ($vcmp.readini(vcmp.destinations.ini,%a,STATUS) == 1) {
      var %loc =  $vcmp.readini(vcmp.destinations.ini,%a,x) $vcmp.readini(vcmp.destinations.ini,%a,y) $vcmp.readini(vcmp.destinations.ini,%a,z)
      if ($1 == pickups) .timer -m 1 %b vcmp.newpickup 56 %loc
      else .timer -m 1 %b vcmp.setdestination $vcmp.readini(vcmp.destinations.ini,%a,ID) %loc
      %b = %b + 50
    }
    !inc %a
  }
}
from old rm scripts... stored in vcmp.destinations.ini with same syntax as gus vcmp.pickups.ini...

if you call the alias with pickups after... (vcmp.destination.addall pickups) it creates invisable pickups with id 56... so you can detect using scripts....

heres the old detection identifier:
alias vcmp.getdestination {
  var %id = $1
  var %a = 1, %b = 1
  %t = $vcmp.readini(vcmp.destinations.ini,TOTALL,TOTALL)
  while (%a <= %t) {
    if ($vcmp.readini(vcmp.destinations.ini,%a,STATUS) == 1) {
      var %x =  $vcmp.readini(vcmp.destinations.ini,%a,x)
      var %y = $vcmp.readini(vcmp.destinations.ini,%a,y)
      var %z = $vcmp.readini(vcmp.destinations.ini,%a,z)
      if ($inellipse($vcmp.location(%id,x),$vcmp.location(%id,y),$calc(%x - 5),$calc(%y - 5) ,10,10)) return %a
      %b = %b + 50
    }
    !inc %a
  }
  return unknown
}



and you would need to make scripts create the markers when players join...

heres the ini file i used to use: http://grandkillers.uberaaz.com/filez/vcmp.destinations.ini
Title: Re: Gus (Markers)
Post by: Amenine on December 20, 2008, 09:53:57 AM
Very much Thanks to u........ ;D