Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: thijn on August 25, 2008, 08:10:44 PM

Title: Need help with Class detection
Post by: thijn on August 25, 2008, 08:10:44 PM
i have this code:

timer 1 3 vcmp.spawned($1)

alias:

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
Title: Re: Need help with Class detection
Post by: bazza on August 25, 2008, 08: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.

Title: Re: Need help with Class detection
Post by: thijn on August 26, 2008, 02: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