View Single Post
  #4  
Old 08-12-2010, 08:36 PM
xMane xMane is offline
NPC-Server (Server)
xMane's Avatar
Join Date: May 2010
Posts: 59
xMane is on a distinguished road
Quote:
Originally Posted by Deas_Voice View Post
ever heard of code styling? (if you haven't, google it!)

i doubt anyone would help you without you putting some effort in learning how to style your code.

PHP Code:
function exampleOfStyling() {
  if (
value == foo) {
    
doFoo();
  }
  else if (
value == bar) {
    if (
bar == 5) {
      
doBar();
    } else 
doBarTwo();
  }

it will also make your code much easier to read for others.
ahh! fine...
PHP Code:
function onPlayerChats(){
  if(
player.guild.starts("Events")){
    if(
player.chat="/setteams"){
      
players.remove(player.account);
      
playerscount-1;
      
player.chat=int((playerscount-1)/4)@"/"@playerscount-1;
      for (
i=0;i<playerscount-1;i++){
        if(!(
players[int(i)].guild.starts("Events"))){
          
players[int(i/12)].setlevel2("event_ttw-lobby.nw",23.5,30);
          
players[int(i/12)].guild "TTW Team 1";
          
players[int(i/8)].setlevel2("event_ttw-lobby.nw",44,30);
          
players[int(i/8)].guild "TTW Team 2";
          
players[int(i/4)].setlevel2("event_ttw-lobby.nw",23.5,44.5);
          
players[int(i/4)].guild "TTW Team 3";
          
players[int(i)].setlevel2("event_ttw-lobby.nw",44,44.5);
          
players[int(i)].guild "TTW Team 4";
        }
      }
    }
  }

Reply With Quote