Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: Daniel95 on March 13, 2009, 04:36:45 pm

Title: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 13, 2009, 04:36:45 pm
I was want say thanks to [AoD]NC for helping me did the !get all command its really work :)

I look at the fbs script and he have the !hunt and !heal all command too...
How i did it to wsv script?
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: [AoD]NC on March 13, 2009, 07:01:27 pm
;o ok :D.

Heal in FBS with the WSV only for admin level 2 looks so:
Code: [Select]
  elseif ($3 == healall) {
      if ($WSV.levels($4) > 1) vcmp.msg $1 $2 You need to be Admin level 2 or higher.
    else {
      vcmp.say $1 ** Admin $vcmp.name($1, $2) healed everyone in the server
      var %a = 0
      while (%a <= %limit) {
        vcmp.sethealth $1 %a 100   
        !inc %a
      }
    }
  }
You must look if WSV has an alias vcmp.sethealth and vcmp.name [open the script in Notepad, Find Text and type vcmp.sethealth search, and then search after vcmp.name]. If u didnt find anything, probably u must change the vcmp.sethealth and vcmp.name into WSV aliases. I don't know WSV, but maybe it would be WSV.sethealth and WSV.name.
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 13, 2009, 10:03:53 pm
I don't know WSV, but maybe it would be WSV.sethealth and WSV.name.
That's right.
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 14, 2009, 09:44:33 am
OK thanks i will try it later... ;) :)
What about the: jail command?
Can help in this?
FBS have it too   :)
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: [AoD]NC on March 14, 2009, 12:35:25 pm
Quote
That's right.
O ho hahaa i'm good  :D

Jail is simple. It's teleporting a player into a place and freezing him controls for f.e. 10 seconds.

FBS:
Code: [Select]
  elseif ($3 == jail) {
    if ($WSV.levels($4) > 4) wsv.msg $1 You need to be Admin level 5 or higher.
    elseif (!$4) wsv.msg $1 Error - Correct Syntax: /c $3 <Nick> <Reason>
    else {
      wsv.say ** Jailing player: $WSV.name($2) Reason: $5-
      WSV.setlocation $2 389.423 -507.512 9.396 0
      WSV.setcontrols $2 0
      timer 1 10 WSV.setcontrols $2 1
      timer 1 10 wsv.say ** Freeing $WSV.name($2) from jail
    }
  }

I don't know if i made this good :P. I used that $2 is the player name, if in WSV isn't $2 the player name, change it. And i don't know what with the reason for jailing.

Anyway the originally jail form FBS looks so:
Code: [Select]
  elseif ($3 == jail) {
    if ($FBS.lin($1, $2) == $null) vcmp.msg $1 $2 You must either register or be logged in as Admin Level 5.
    elseif ($FBS.Level($1, $2) < 5) vcmp.msg $1 $2 Error, You need to be at least level 5 to use this command.
    elseif (!$4) vcmp.msg $1 $2 Error - Correct Syntax: /c $3 <Nick/ ID> <Reason>
    elseif ($vcmp.name($1, $FBS.ID($4)) == Unknown) vcmp.msg $1 $2 Error: Invalid Nick-Name
    else {
      vcmp.say $1 ** Admin $vcmp.name($1, $2) jailed:[ $vcmp.name($1, $FBS.ID($4)) $chr(93) Reason:[ $iif($5-,$v1,None) $chr(93))
      vcmp.setlocation $1 $FBS.ID($4) 389.423 -507.512 9.396 0
      vcmp.setcontrols $1 $FBS.ID($4) 0
      timer 1 60 vcmp.setcontrols $1 $FBS.ID($4) 1
      timer 1 60 vcmp.say $1 ** Freeing $vcmp.name($1, $fbs.id($4)) from jail
    }
  }
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 14, 2009, 01:52:02 pm
The healall and jail commands not work  :'( only the getall

You can write agin the code of the heealall and jail commands?
Maybe was some mistake  :-\
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Amenine on March 14, 2009, 10:03:34 pm
here try this..timer jail..
Usage !jail <player> <time/sec>..
Enjoy.../
Code: [Select]
elseif (jail* iswm $3) {
      if ($WSV.pconnected($4)) {
        if ($5) {
          if $WSV.levels($2) >= $WSV.levels($4) {
          WSV.cmdlevelcheck3 $1-
          WSV.say Admin $WSV.name($2) Jailed player: $chr(91) $WSV.name($4) $chr(93) For: $chr(91) $5- $chr(93) seconds.
          WSV.setlocation $WSV.id($4) 381.6198 -504.7959 9.3956
          WSV.setweapon $WSV.id($4) 0 1
          WSV.announce $WSV.id($4) You are ~o~jailed! ~u~for $5- seconds
          WSV.setcontrols $WSV.id($4) 0
          !.timer 1 $5- /WSV.setcontrols $WSV.id($4) 1
          !.timer 1 $5- /WSV.announce $WSV.id($4) Jailing over! you can go now
         }
         else WSV.msg $2 You can't jail someone who has higher level than you.
         }
         else WSV.msg $2 Please set the jailing time.
         }
         else WSV.msg $2 Player unavailable!
    }
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 15, 2009, 03:45:29 pm
Its not work  >:( :( :'(
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 15, 2009, 07:20:55 pm
What did u try to fix it??
I guess nothing,
Sorry, but i think u need to try fixing urself.
If it still wont work you can ask here, We are happy to help you ;)
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 15, 2009, 10:14:43 pm
What did u try to fix it??
Sorry, but i think u need to try fixing urself.
If it still wont work you can ask here, We are happy to help you ;)

Its not gonna to work
This i copy to my scripter editor:

elseif ($3 == jail) {
  if ($WSV.levels($4) > 4) wsv.msg $1 You need to be Admin level 5 or higher.
  elseif (!$4) wsv.msg $1 Error - Correct Syntax: /c $3 <Nick> <Reason>
  else {
    wsv.say ** Jailing player: $WSV.name($2) Reason: $5-
    WSV.setlocation $2 389.423 -507.512 9.396 0
    WSV.setcontrols $2 0
    timer 1 10 WSV.setcontrols $2 1
    timer 1 10 wsv.say ** Freeing $WSV.name($2) from jail
  }
}

Yes here some mistake?
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 15, 2009, 10:56:56 pm
What happens when u use it??
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 16, 2009, 04:32:44 pm
What happens when u use it??

I go to the server type !jail and its write "invalid command"
I try this too with /c jail and its not work too  :'(
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: StriKe on March 16, 2009, 07:37:12 pm
What happens when u use it??

I go to the server type !jail and its write "invalid command"
I try this too with /c jail and its not work too  :'(

Post what error you get in your status windows here
so other can help you out
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 16, 2009, 09:41:45 pm
No errors only then i put the command code and go to the server and type !jail and /c jail its wrote me invalid command  :-\ :P :'(
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 16, 2009, 10:39:54 pm
What happens when u use it??

I go to the server type !jail and its write "invalid command"
I try this too with /c jail and its not work too  :'(
The only reasons I can guess:
1) U didnt add it on the right place
2) U made a mistake with the "elseif ($3 == jail) {"

And like strike said, please post any error messages in ur status window
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 17, 2009, 03:40:23 pm
What happens when u use it??

I go to the server type !jail and its write "invalid command"
I try this too with /c jail and its not work too  :'(
The only reasons I can guess:
1) U didnt add it on the right place
2) U made a mistake with the "elseif ($3 == jail) {"

And like strike said, please post any error messages in ur status window

I say agin...no errors its only say inavalid command.  :'(
So if its the wrong code so what is the true one and where i need to put it?  ???
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 17, 2009, 05:16:52 pm
Just with ur normal commands, And don't forget to reload the script.
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 17, 2009, 09:57:39 pm
Code: [Select]
elseif (jail* iswm $3) {
      if ($WSV.pconnected($4)) {
        if ($5) {
          if $WSV.levels($2) >= $WSV.levels($4) {
          WSV.cmdlevelcheck3 $1-
          WSV.say Admin $WSV.name($2) Jailed player: $chr(91) $WSV.name($4) $chr(93) For: $chr(91) $5- $chr(93) seconds.
          WSV.setlocation $WSV.id($4) 381.6198 -504.7959 9.3956
          WSV.setweapon $WSV.id($4) 0 1
          WSV.announce $WSV.id($4) You are ~o~jailed! ~u~for $5- seconds
          WSV.setcontrols $WSV.id($4) 0
          !.timer 1 $5- /WSV.setcontrols $WSV.id($4) 1
          !.timer 1 $5- /WSV.announce $WSV.id($4) Jailing over! you can go now
         }
         else WSV.msg $2 You can't jail someone who has higher level than you.
         }
         else WSV.msg $2 Please set the jailing time.
         }
         else WSV.msg $2 Player unavailable!
    }

I put this into the scripter editor (where is all my commands for WSV)
And after that restart the scripts?
Or need to reload the the scripts?
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on March 17, 2009, 11:18:54 pm
reload is enough
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 18, 2009, 03:38:01 pm
reload is enough

OK thanks for helping  :D ;) :)
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: Daniel95 on March 18, 2009, 04:28:14 pm
Steal not work  :-\ :'(
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: [XT]ariel[X] on September 06, 2009, 07:15:24 am
lol
the commands Heal and Chaleco

Heal Scripts..
Code: [Select]
   elseif ($3 == heal) {  
      WSV.say Recargando Vida...
      WSV.sethealth $2 100
    }
Chaleco Scripts..
Code: [Select]
   elseif ($3 == chaleco) {  
      WSV.say Recargando Chaleco...
      WSV.setarmour $2 100
    }
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: thijn on September 06, 2009, 07:19:50 pm
eeh spam?
Title: Re: Add 2 commands to WSVv0.3 (if its spam i really soory)
Post by: [XT]ariel[X] on September 06, 2009, 09:51:09 pm
no lol