View Single Post
  #16  
Old 08-26-2009, 03:41 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by zokemon View Post
Why not this instead:
NPC Code:
function onActionSetMatchServer(match, vplayer, splayer) {
makevar("serverr.sdematch" @ match) = {vplayer, splayer};
}



Don't make a loop if you don't have to

Actually the loop idea is much better than your idea because your idea is insecure in that a player would have the potential of creating an unlimited number of serverr. vars.

If you want to go the route of not using a loop, you would have to add an extra check to prevent the above from happening, something like:

PHP Code:
if (match in |110|) 
Reply With Quote