Its for the same code, so I'm going to keep posting the same problems with it here.
PHP Code:
function onCreated() {
this.setshape(1, 32, 32);
}
function onActionWarpPlayert() {
temp.dest = {"testtourny.nw", 2, 2};
player.setlevel2(dest[0], dest[1], dest[2]);
}
function onActionSetMatchServer(match, vplayer, splayer) {
for (temp.i = 0; temp.i <= 10; temp.i++) {
if (match == i) makevar("this.sdematch" @ i) = {vplayer, splayer};
}
}
function onPlayerTouchsMe(){
temp.matchlist = "";
for (temp.i = 1; temp.i <= 10; temp.i ++)
{
matchlist @= "Match " @ i @ ": " @ 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.x + 0.5, this.y + 0.5, "SetMatchServer", temp.match, temp.vplayer,temp.splayer);
}
if (player.chat.starts("startmatches")){
for (temp.i = 1; temp.i <= 10; temp.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.
