View Single Post
  #33  
Old 08-28-2009, 08:24 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Its for the same code, so I'm going to keep posting the same problems with it here.
PHP Code:
function onCreated() {
  
this.setshape(13232);
}
function 
onActionWarpPlayert() {
  
temp.dest = {"testtourny.nw"22};
  
player.setlevel2(dest[0], dest[1], dest[2]);
}
function 
onActionSetMatchServer(matchvplayersplayer) {
  for (
temp.0temp.<= 10temp.i++) {
    if (
match == imakevar("this.sdematch" i) = {vplayersplayer};
  }
}


function 
onPlayerTouchsMe(){
  
temp.matchlist "";
  for (
temp.1temp.<= 10temp.++)
    {
    
matchlist @= "Match " ": " this.(@"sdematch" i)[0] @ " vs. " this.(@"sdematch" i)[1] @ "#b";
  }
  
say2(matchlist);

}
function 
onPlayerChats(){
  if (
player.account in serverr.sdeaccess)
    {
    if (
player.chat.starts("setmatch")) {
      
temp.match player.chat.tokenize()[1];
      
temp.vplayer player.chat.tokenize()[2];
      
temp.splayer player.chat.tokenize()[3];
      
triggeraction(this.0.5this.0.5"SetMatchServer"temp.matchtemp.vplayer,temp.splayer);
    }
    if (
player.chat.starts("startmatches")){
      for (
temp.1temp.<= 10temp.i++) {
        
this.whatmatch = @ this.(@"sdematch" i) @;
        if (
this.whatmatch == 0){
        
this.whatmatch ++;
          
this.chat "End of Round!";

        }else{
          
temp.mplayer1 = @ this.(@"sdematch" this.whatmatch)[0] @;
          
temp.mplayer2 = @ this.(@"sdematch" this.whatmatch)[1] @;
          
this.chat this.whatmatch;
        }
      }
    }
  }

What im working on now is where it does the "startmatches". Trying to get it to work where it goes through each match, warps the players in, then when they die, warps them out, then moves to match 2, and does the same thing all the way through match 10.
An example, or even just an explanation of what code to use. Tried everything I can remember, been 4 years since I touched this stuff.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote