Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: BoySticK on December 20, 2008, 05:27:16 PM

Title: !getall....
Post by: BoySticK on December 20, 2008, 05:27:16 PM
How can i do !getall?
HELP!!!

thnx

note:GUS
Title: Re: !getall....
Post by: thijn on December 20, 2008, 10:13:08 PM
try this:

elseif ($2 == !getall) {
vcmp.say Getting all players to Admin %name
var %a = 0
while (%a < 20) {
if ($vcmp.name(%a) != Unkown) vcmp.setlocation %a $vcmp.location(%id)
!inc %a
}
}
Title: Re: !getall....
Post by: Force on December 20, 2008, 10:50:45 PM
Yeh, Just noticed a typo in there Thij, not sure if anyone else will do so I've just corrected your typo. ;)


elseif ($2 == !getall) {
  vcmp.say Getting all players to Admin %name
  var %a = 0
  while (%a < 20) {
    if ($vcmp.name(%a) != Unknown) vcmp.setlocation %a $vcmp.location(%id)
    !inc %a
  }
}
Title: Re: !getall....
Post by: BoySticK on December 21, 2008, 02:02:02 AM
ohh thnx again! ;D ;D
Title: Re: !getall....
Post by: thijn on December 21, 2008, 02:33:52 PM
just for the info: What was the typo ???
Title: Re: !getall....
Post by: Amenine on December 21, 2008, 04:18:51 PM
Hey thijn i have seen u u r posting useless replies all around the forum ...stop it....u will get ur 200 posts ..dont be so hurry about that..

Regards
Amenine
Title: Re: !getall....
Post by: thijn on December 21, 2008, 05:24:47 PM
useless? I just wanna know what i did wrong so i can learn lolz, The post u make is spamming....
So i can say to you: Stop spamming the forum (ooh and stop spamming my PM box to!)
Title: Re: !getall....
Post by: Force on December 21, 2008, 07:45:02 PM
Quote from: thijn on December 21, 2008, 02:33:52 PM
just for the info: What was the typo ???

Hey Thij, You had Unkown instead of Unknown  ;)
Title: Re: !getall....
Post by: thijn on December 21, 2008, 10:40:14 PM
ooh  ;D Little typo :P
Title: Re: !getall....
Post by: [NoN]Toiletduck on December 26, 2008, 12:03:01 AM
There is one problem with this script.  It does not check vcmp.cmdcheck so you cannot put a restriction on what level players are allowed to use it.

Like this:

}
  elseif ($2 == !getall) {
    if ($vcmp.cmdcheck(!getall,%id) == fail) !halt
    vcmp.say Getting all players to Admin %name
    var %a = 0
    while (%a < 20) {
      if ($vcmp.name(%a) != Unknown) vcmp.setlocation %a $vcmp.location(%id)
      !inc %a
    }


Only you must add !getall to vcmp.cmdlevel.ini and then put the minimum level of players that are allowed to use it.