View Single Post
  #1  
Old 08-22-2009, 05:28 PM
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
Question on Server... again ...

PHP Code:
function onCreated() {
  
this.setshape(1, 32, 32);
}

function 
onActionSetMatchServer(match,vplayer,splayer){
if (
temp.match == "1"){
  
serverr.sdematch1 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "2"){
  
serverr.sdematch2 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "3"){
  
serverr.sdematch3 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "4"){
  
serverr.sdematch4 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "5"){
  
serverr.sdematch5 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "6"){
  
serverr.sdematch6 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "7"){
  
serverr.sdematch7 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "8"){
  
serverr.sdematch8 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "9"){
  
serverr.sdematch9 = {temp.vplayer, temp.splayer};
}
if (
temp.match == "10"){
  
serverr.sdematch10 = {temp.vplayer, temp.splayer};
}
}
//#CLIENTSIDE
function onCreated() {
  
this.setshape(1, 32, 32);
}

function 
onPlayerChats(){
  if (!(
player.account in {"sssssssssss", "Decus_Arillias"})) return;
  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);
  }
} 
ok, now what I'm trying to do, obviously, is set 10 matches. There has got to be a better way to do this than have 10 different server flags isnt there?

I know I could go reading 10 in the array, and I think to pull it out i'd need a for(), but I tried. I've been out of this for 4 years. Sorry guys.
__________________
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