Author Topic: Need help with Class detection  (Read 3209 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
Need help with Class detection
« on: August 25, 2008, 09:10:44 pm »
i have this code:
Code: [Select]
timer 1 3 vcmp.spawned($1)
alias:
Code: [Select]
alias vcmp.spawned {
  if (Biker isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name(%id) Biker
  vcmp.msg $vcmp.getid($1) You spawned as a Biker.
  vcmp.msg $vcmp.getid($1) Area: $vcmp.area($vcmp.getid($1))
  }
  if (Pole isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name($vcmp.getid($1)) Stripper
  vcmp.msg $vcmp.getid($1) You spawned as a Stripper.
    vcmp.msg %id Area: $vcmp.area($vcmp.getid($1))
  }
  if (Fire isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name($vcmp.getid($1)) Fire-Man
  vcmp.msg $vcmp.getid($1) You spawned as a Fire-Man.
    vcmp.msg $vcmp.getid($1) Area: $vcmp.area($vcmp.getid($1))
  }
  if (Sady isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name($vcmp.getid($1)) Paramedic
  vcmp.msg $vcmp.getid($1) You spawned as a Paramedic.
    vcmp.msg $vcmp.getid($1) Area: $vcmp.area($vcmp.getid($1))
  }
  if (Police isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name($vcmp.getid($1)) Cop
  vcmp.msg $vcmp.getid($1) You spawned as a Cop.
    vcmp.msg $vcmp.getid($1) Area: $vcmp.area($vcmp.getid($1))
  }
  if (Military isin $vcmp.area($vcmp.getid($1))) {
  hadd -m vcmp.skins $vcmp.name($vcmp.getid($1)) Military
  vcmp.msg $vcmp.getid($1) You spawned as a Military.
    vcmp.msg $vcmp.getid($1) Area: $vcmp.area($vcmp.getid($1))
  }
}
But when i spawn (it should chk my skin/location) mirc says a error:
Quote
* Timer 2 activated
-
* Timer 2 halted
-
* /vcmp.spawned($1   : not connected to server

Why??? I'm connected to my server ??

p.s Im using GUS

Offline bazza

  • Street Thug
  • *
  • Posts: 18
    • View Profile
Re: Need help with Class detection
« Reply #1 on: August 25, 2008, 09:18:37 pm »
try

.timer 1 3 /vcmp.spawned $1

Also, in the alias vcmp.spawned replace every occurrence of this....

$vcmp.name($vcmp.getid($1))

with this....

$1

this will speed up the script processing.

« Last Edit: August 25, 2008, 09:23:04 pm by bazza »

Offline thijn

  • LU testers
  • VC:MP Veteran
  • *
  • Posts: 667
  • Im proud to be pro.
    • View Profile
    • Vice Underdogs
Re: Need help with Class detection
« Reply #2 on: August 26, 2008, 03:43:29 pm »
Still dont work :(
Same Error:
* /vcmp.spawned($1): not connected to server
 ??? ???
Someone can help me?

EDIT: Sorry fixed, i maked a typo :P

**Thijn locks the topic
« Last Edit: August 26, 2008, 10:18:15 pm by thijn »