• Welcome to Vice City Multiplayer.
 

gotoloc \save loc for wsv

Started by qwq, October 20, 2009, 11:47:45 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

qwq

k i have tamas code:
  if ($4) {
    if (!$hget(WSV.Savedlocks,$4)) {
      hadd WSV.Savedlocks $4 $calc($WSV.location($2).x) $calc($WSV.location($2).y) $calc($WSV.location($2).z)
      WSV.msg $2 Location saved sucessfully! Name: $chr(91) $4 $chr(93)
      WSV.msg $2 Coord: $calc($WSV.location($2).x) $calc($WSV.location($2).y) $calc($WSV.location($2).z)
    }
    else WSV.msg $2 Error: This location name is allready saved!
  }
  else WSV.msg $2 Syntax: /c saveloc <locname>
}
elseif ($3 == gotoloc) && ($2 < 100) {
  WSV.cmdlevelcheck $1-
  if ($4) {
    if ($hget(WSV.Savedlocks,$4)) {
      WSV.setlocation $2 $WSV.savedloc($4)
      WSV.say Teleporting: $WSV.name($2) To: $chr(91) $4 $chr(93)
      WSV.msg $2 Location: $WSV.savedloc($4)
    }
    else WSV.msg $2 Error: This location name is not on the saved list.
  }
  else WSV.msg $2 Syntax: /c gotoloc <locname>
}



i put it in the end of wsv
and when i do the cmds its not work say invalid

and with greg lms i load it
it wrote this:HEF (Universal Public Version) LastManStanding Module v1.0 by Greg
---
-
Status - Successfully Loaded.
-
and no lms

what to do

[XT]ariel[X]

Clic in image from enter in my web :D

qwq

thx rulk ill try
but the lms is not inside the wsv
is in different file

qwq


thijn

Try this modified one:

on *:START:{
  echo -s -----
  echo -s HEF (Universal Public Version) LastManStanding Module $hef.lms.version by Greg
  echo -s ---
  echo -s -
  echo -s Status - Successfully Loaded.
  echo -s -
}

alias hef.startlms {

  var %i = 1
  set %lmslock = 1

  if ($hget(lms, 0).item <= 1) {
    WSV.say ** LastManStanding has Rejected. Reason: Not enough Players
    if ($hget(lms, 0).item == 1) {
      WSV.setcontrols $WSV.getid($hget(lms, 1).item) 1
      WSV.setarmour $WSV.getid($hget(lms, 1).item) 0
    }
    hfree lms
    unset %lms
    unset %lmslock
    !halt
  }

  else {

    .timerann $+ 1 1 2 hef.annlms $1 ~h~-- GET READY! --
    .timerann $+ 2 1 5 hef.annlms $1 -- 3 --
    .timerann $+ 3 1 6 hef.annlms $1 ~y~-- 2 --
    .timerann $+ 4 1 7 hef.annlms $1 ~y~-- 1 --
    .timerann $+ 5 1 9 hef.annlms $1 ~t~-- FIGHT! --
    .timerrestcontlms 1 8 hef.restcontlms $1
  }
}

alias hef.lms.version !return v1.0

alias hef.annlms {

  var %i = 1

  while ($hget(lms, %i).item != $null) {

    WSV.announce $WSV.getid($hget(lms, %i).item) $2-
    inc %i
  }
}

alias hef.restcontlms {

  var %i = 1

  while ($hget(lms, %i).item != $null) {

    WSV.setcontrols $WSV.getid($hget(lms, %i).item) 1
    inc %i
  }
}


on *:signal:WSV.commands: {

if ($3 == lms) {

  if (%lms == on) || ($hget(lms, 0).item != 0) {
    WSV.msg $2 Error - LastManStanding is Already in Progress!
  }

  else {

    hmake lms
    set %lms on

    timer 1 1 WSV.say ** LastManStanding has Started! To Join, type !join Within 20 Seconds.
    timer 1 20 hef.startlms
  }
}

elseif ($3 == join) {

  if (!%lms) WSV.msg $2 Error - LastManStanding is not Active!
  elseif ($hget(lms, $WSV.name($2)) != $null) WSV.msg $2 Error - You Already joined LastManStanding.
  elseif (%lmslock) WSV.msg $2 Error - You Must Wait Until this Round of LMS Ends.
  else {
    hadd -m lms $WSV.name( $2) 1
    WSV.say ** $WSV.name($2) has joined LastManStanding!
    WSV.msg $2 Taking you to LastManStanding. Enjoy!
    WSV.setlocation $2 -754.187866 -1602.638916 23.734970
    WSV.setcontrols $2 0
    WSV.setarmour $2 100
    WSV.sethealth $2 100
  }
}

}

on *:SIGNAL:WSV.kill {

  if ($hget(lms, 0).item != 0) {
    if ($hget(lms, 0).item == 2) && ($hget(lms, $WSV.name($2)) != $null) {
      hdel lms $WSV.name($2)

      if ($hget(lms, 1).item == $null) {
        WSV.say ** LastManStanding has Ended. Winner: No Winner
      }
      else {
        WSV.say ** LastManStanding has Ended. Winner: $hget(lms, 1).item
        WSV.announce $WSV.getid($hget(lms, 1).item) ~h~ $chr(32) $+ congratulations! ~t~you won lastmanstandig!
      }
      hfree lms
      unset %lms
      unset %lmslock
    }
    elseif ($hget(lms, 0).item >= 3) hdel lms $WSV.name($2)
  }
}

on *:SIGNAL:WSV.part: {

  if ($hget(lms, 0).item != 0) {
    if ($hget(lms, 0).item == 2) && ($hget(lms, $WSV.name($2)) != $null) {
      hdel lms $WSV.name($2)

      if ($hget(lms, 1).item == $null) {
        WSV.say ** LastManStanding has Ended. Winner: No Winner
      }
      else {
        WSV.say ** LastManStanding has Ended. Winner: $hget(lms, 1).item
        WSV.announce $WSV.getid($hget(lms, 1).item) ~h~ $chr(32) $+ congratulations! ~t~you won lastmanstandig!
      }
      hfree lms
      unset %lms
      unset %lmslock
    }
    elseif ($hget(lms, 0).item >= 3) hdel lms $WSV.name($2)
  }
}


qwq

i already did wsv instead vcmp
but when i load it it say it on but when i do !lms its says invalid command

thijn



qwq


[XT]ariel[X]

not is the one several post to saveloc and gotoloc for WSV -.-!
   
improved the script  :D

Code (Saveloc) Select

    elseif ($3 == saveloc) {
      if ($4) {
        writeini -n " $+ $scriptdirSavedLocs.ini" SavedLocs $4 $WSV.location($2)
        WSV.say ยป New Location - Nombre: $WSV.name($2) - Name Saveloc: $4
      }
      else WSV.msg $2 Error - Format: !saveloc <Name> or /c Saveloc <Name>
    }

Code (Gotoloc) Select

    elseif ($3 == gotoloc) {
      if ($readini(" $+ $scriptdirSavedLocs.ini",SavedLocs,$4)) {
        .timer 1 5 /WSV.setlocation $2 $readini(" $+ $scriptdirSavedLocs.ini",SavedLocs,$4)
        WSV.announce $2 ~h~Teleporting to $4
      }
      else WSV.msg $2 Error - Invalid Location.
    }
Clic in image from enter in my web :D