Author Topic: $vcmp.area(%id) Doesnt work  (Read 5213 times)

0 Members and 1 Guest are viewing this topic.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
$vcmp.area(%id) Doesnt work
« on: August 20, 2008, 01:08:19 pm »
Whats wrong with this:
Quote
on *:SIGNAL:vcmp.spawn:{
  var %name = $1
  var %id = $vcmp.getid($1)
 
  echo @Server 5 $+ >> $1 spawned $+ 
  if ($vcmp.setting.spawn == On) vcmp.say >> $1 spawned
  if (($vcmp.pass(%id) != $null) && ($vcmp.lin(%id) != 1)) {
    if ($vcmp.ip(%name) == $readini(vcmp.admin.ini,IPS,%name)) {
      vcmp.say $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator)) %name Auto-Logged In (Admin Level: $vcmp.level(%id) $+ )
      vcmp.msg %id You Auto Logged In - Nick-Name: %name $+ , Admin Level: $vcmp.level(%id) $+ , Status: $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator))
      vcmp.timer.login %name off
      !writeini -n vcmp.admin.ini LIN %name 1
      !writeini -n vcmp.admin.ini IPS %name $vcmp.ip(%name)
    }
    else {
      vcmp.announce %id PLEASE LOGIN TO THIS NICK-NAME
      vcmp.msg %id You Must Login to this Nick-Name! Type: /c login <password>
      vcmp.sethp %id 0
    }
  }
  vcmp.add.spawns $vcmp.getid($1) 1

  ;!writeini -n vcmp.cheat.ini CHECK $1 0
  vcmp.msg %id $vcmp.area(%id)
}
Because if i spawn i get no msg.
When i do:
Quote
on *:SIGNAL:vcmp.spawn:{
  var %name = $1
  var %id = $vcmp.getid($1)
 
  echo @Server 5 $+ >> $1 spawned $+ 
  if ($vcmp.setting.spawn == On) vcmp.say >> $1 spawned
  if (($vcmp.pass(%id) != $null) && ($vcmp.lin(%id) != 1)) {
    if ($vcmp.ip(%name) == $readini(vcmp.admin.ini,IPS,%name)) {
      vcmp.say $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator)) %name Auto-Logged In (Admin Level: $vcmp.level(%id) $+ )
      vcmp.msg %id You Auto Logged In - Nick-Name: %name $+ , Admin Level: $vcmp.level(%id) $+ , Status: $iif($vcmp.level(%id) == 0,Member,$iif($vcmp.level(%id) == 1,Registered Player,Administrator))
      vcmp.timer.login %name off
      !writeini -n vcmp.admin.ini LIN %name 1
      !writeini -n vcmp.admin.ini IPS %name $vcmp.ip(%name)
    }
    else {
      vcmp.announce %id PLEASE LOGIN TO THIS NICK-NAME
      vcmp.msg %id You Must Login to this Nick-Name! Type: /c login <password>
      vcmp.sethp %id 0
    }
  }
  vcmp.add.spawns $vcmp.getid($1) 1

  ;!writeini -n vcmp.cheat.ini CHECK $1 0
  vcmp.msg %id Spawned
}
It works ??? ??? ???
Why?

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: $vcmp.area(%id) Doesnt work
« Reply #1 on: August 20, 2008, 04:16:24 pm »
Try putting a timer on it.

For example:

Code: [Select]
timer 1 3 vcmp.msg %id Spawned at Location: $vcmp.area(%id)

This is because when you initially spawn it gets your location from where you died ;)

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: $vcmp.area(%id) Doesnt work
« Reply #2 on: August 23, 2008, 04:33:07 pm »
This still doesnt work :(
also my !loc does nothing :-\ :-\ :'(
$vcmp.location(%id) works, but $vcmp.area(%id) not, nothing happens!

What is wrong with area??

i didnt change anything to th alias ??? ???

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: $vcmp.area(%id) Doesnt work
« Reply #3 on: August 24, 2008, 12:02:54 pm »
PLz can someone help me :'( :'( :'(

EDIT: MIRC got this error: * Invalid parameters: $inpoly (line 936, gus.mrc)
« Last Edit: August 24, 2008, 02:20:18 pm by thijn »

szostol

  • Guest
Re: $vcmp.area(%id) Doesnt work
« Reply #4 on: August 24, 2008, 02:19:19 pm »
change $vcmp.area(%id) to $vcmp.area($1). Should work, if not try change to %b. If still not change to %a but probably $1 or %b will work.

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: $vcmp.area(%id) Doesnt work
« Reply #5 on: August 24, 2008, 02:27:45 pm »
none of them work  :-\ :-\

still error:
Quote
* Invalid parameters: $inpoly (line 936, gus.mrc)
line 936 is bold
Quote
alias vcmp.area {
  var %a,%b = 1,%c = $vcmp.location($1,x),%d = $vcmp.location($1,y),%e
  while (%b <= $ini(vcmp.data.ini,AREAS,0)) {
    %e = $ini(vcmp.data.ini,AREAS,%b)
    if ($inpoly(%c,%d, [ %e ] )) !return $readini(vcmp.data.ini,AREAS,%e)
    !inc %b
  }
  !return Vice-City
}

Offline GOLG

  • Street Thug
  • *
  • Posts: 2
    • View Profile
Re: $vcmp.area(%id) Doesnt work
« Reply #6 on: August 27, 2008, 01:45:33 pm »
make sure your not using a very old version of mirc.

update to the lastest version or 6.16 and above.

Offline VRocker

  • LU Developer
  • Wiseguy
  • *
  • Posts: 63
    • View Profile
    • Liberty Unleashed - GTA3 Multiplayer Mod
Re: $vcmp.area(%id) Doesnt work
« Reply #7 on: August 27, 2008, 01:55:30 pm »
Seems to me that you have an invalid line in your vcmp.data.ini file under [AREAS]. This would cause the invalid parameters error if there is a stray letter somewhere. Try wiping the [AREAS] section clean then gradually re-add lines until it fails.

You could also pastebin it and give us the link (It may be long) so we can have a look for ourselves