Author Topic: [RESOLVED]Snipers Mini - Game  (Read 2712 times)

0 Members and 1 Guest are viewing this topic.

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
[RESOLVED]Snipers Mini - Game
« on: July 01, 2008, 05:22:13 pm »
Hi,

I am making a Snipers Mini - Game (M60's for now :P) with Windlord for Sansan. I have got this code to sort the round but I don't know how I am going to restore everyone's control's when the !go command is typed :(. Here is the code, if you are able to help it would be appreciated :)

Code: [Select]
    elseif ($2 == !go) {
      if ($hget(SnipeHashTable,$vcmp.hgetname($1)) != Sniping) { vcmp.adminmsg %id You are not participating! }
      elseif ($hget(GoHashTable,Go) != Standby) { vcmp.adminmsg %id You can't start yet! Other paricipants may want to join! }
      else {
        timer 1 1 vcmp.gametext.all vcmp.doforall - 3 -
        timer 1 2 vcmp.gametext.all vcmp.doforall - 2 -
        timer 1 3 vcmp.gametext.all vcmp.doforall - 1 -
        timer 1 4 vcmp.gametext.all vcmp.doforall Fight!
        timer 1 5 vcmp.setcon vcmp.doforall 1
      }
    }

the vcmp.setcon vcmp.doforall was something I added in as a test to try and do it, but it failed. Ideally I would like it to loop round the SnipeHashTable and restore all controls to ppl that are on there..

Any ideas?

Cheers,
« Last Edit: July 01, 2008, 05:42:20 pm by [SDT]F_T_F0RC3 »

Offline Force

  • LU Developer
  • Made Man
  • *
  • Posts: 242
    • View Profile
Re: Snipers Mini - Game
« Reply #1 on: July 01, 2008, 05:41:29 pm »
Resolved the issue, all I had to do was make an alias:

Code: [Select]
alias vcmp.setcon.all vcmp.doforall vcmp.setcon $$1 $$2-


And it was sorted :)