Vice City Multiplayer

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

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

thnx

note:GUS
Title: Re: !getall....
Post by: thijn on December 21, 2008, 12:13:08 am
try this:
Code: [Select]
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 21, 2008, 12:50:45 am
Yeh, Just noticed a typo in there Thij, not sure if anyone else will do so I've just corrected your typo. ;)

Code: [Select]
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, 04:02:02 am
ohh thnx again! ;D ;D
Title: Re: !getall....
Post by: thijn on December 21, 2008, 04:33:52 pm
just for the info: What was the typo ???
Title: Re: !getall....
Post by: Amenine on December 21, 2008, 06: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, 07: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, 09:45:02 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 22, 2008, 12:40:14 am
ooh  ;D Little typo :P
Title: Re: !getall....
Post by: [NoN]Toiletduck on December 26, 2008, 02: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:

Code: [Select]
}
  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.