Results 1 to 10 of 10
  1. #1
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool

    body's don't work

    hey people's

    i tried to build something that changes the body of someone but it gives a syntex error - bad script compile -see console for help


    this is the code i used i put in in a own map called _body.gsc

    then treaded the code bij self thread maps\mp\gametypes\_body::init();

    Code:
    #include maps\mp\_utility;
    
    init()
    {
    	if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
    		level thread Afghan();
    	}
    	if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
    		level thread Scrapyard();
    	}
    	if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
    		level thread Wasteland();
    	}
    	if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
    		level thread Karachi();
    	}
    	if(getDvar("mapname") == "mp_derail"){ /** Derail **/
    		level thread Derail();
    	}
    	if(getDvar("mapname") == "mp_estate"){ /** Estate **/
    		level thread Estate();
    	}
    	if(getDvar("mapname") == "mp_favela"){ /** Favela **/
    		level thread Favela();
    	}
    	if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
    		level thread HighRise();
    	}
    	if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
    		level thread Skidrow();
    	}
    	if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
    		level thread Invasion();
    	}
    	if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
    		level thread Quarry();
    	}
    	if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
    		level thread Rundown();   
    	}
    	if(getDvar("mapname") == "mp_rust"){ /** Rust **/
    		level thread Rust();
    	}
    	if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
    		level thread SubBase();
    	}
    	if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
    		level thread Terminal();       
    	}
    	if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
    		level thread Underpass();
    	}
            	
    
    afghan()
    {
    self attach("head_op_arab_sniper.", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
    
    Scrapyard()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    } 
    
    Wasteland()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
    
    Karachi()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
    
    Derail()
    {
    self attach("head_op_sniper_ghillie_arctic", j_head);
    self setmodel("mp_body_riot_tf141_arctic");
    }
    
    Estate()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
     
    Favela()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Highrise()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Skidrow()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Invasion()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
     
    Quarry()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rundown()
    {
    self attach("head_allies_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rust()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Subbase()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arctic");
    }
    
    Terminal()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
    
    Underpass()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
    does someone know what i did wrong?
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  2. #2
    darkorlegend's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Island Canary
    Posts
    171
    Reputation
    10
    Thanks
    63
    My Mood
    Worried
    Test Now


    Code:
    #include maps\mp\_utility;
    
    init()
    {
    	if(getDvar("mapname") == "mp_afghan"){ /** Afghan **/
    		level thread Afghan();
    	}
    	if(getDvar("mapname") == "mp_boneyard"){ /** Scrapyard **/
    		level thread Scrapyard();
    	}
    	if(getDvar("mapname") == "mp_brecourt"){ /** Wasteland **/
    		level thread Wasteland();
    	}
    	if(getDvar("mapname") == "mp_checkpoint"){ /** Karachi **/
    		level thread Karachi();
    	}
    	if(getDvar("mapname") == "mp_derail"){ /** Derail **/
    		level thread Derail();
    	}
    	if(getDvar("mapname") == "mp_estate"){ /** Estate **/
    		level thread Estate();
    	}
    	if(getDvar("mapname") == "mp_favela"){ /** Favela **/
    		level thread Favela();
    	}
    	if(getDvar("mapname") == "mp_highrise"){ /** HighRise **/
    		level thread HighRise();
    	}
    	if(getDvar("mapname") == "mp_nightshift"){ /** Skidrow **/
    		level thread Skidrow();
    	}
    	if(getDvar("mapname") == "mp_invasion"){ /** Invasion **/
    		level thread Invasion();
    	}
    	if(getDvar("mapname") == "mp_quarry"){ /** Quarry **/
    		level thread Quarry();
    	}
    	if(getDvar("mapname") == "mp_rundown"){ /** Rundown **/
    		level thread Rundown();   
    	}
    	if(getDvar("mapname") == "mp_rust"){ /** Rust **/
    		level thread Rust();
    	}
    	if(getDvar("mapname") == "mp_subbase"){ /** SubBase **/
    		level thread SubBase();
    	}
    	if(getDvar("mapname") == "mp_terminal"){ /** Terminal **/
    		level thread Terminal();       
    	}
    	if(getDvar("mapname") == "mp_underpass"){ /** Underpass **/
    		level thread Underpass();
    	}
            	
    
    afghan()
    {
    self attach("head_op_arab_sniper", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
    
    Scrapyard()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    } 
    
    Wasteland()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
    
    Karachi()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
    
    Derail()
    {
    self attach("head_op_sniper_ghillie_arctic", j_head);
    self setmodel("mp_body_riot_tf141_arctic");
    }
    
    Estate()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
     
    Favela()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Highrise()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Skidrow()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Invasion()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
     
    Quarry()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rundown()
    {
    self attach("head_allies_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rust()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Subbase()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arctic");
    }
    
    Terminal()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
    
    Underpass()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
    Your problem is point.

    afghan()
    {
    self attach("head_op_arab_sniper-> . <-", j_head);

    Please Click in thanks
    Last edited by darkorlegend; 06-25-2011 at 07:36 PM.

  3. #3
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    You can also do:

    self thread Ghillie(0,1);

    Code:
    Ghillie(Type,MyTeam) 
    {
    	ModelType=[];
    	ModelType[0]="GHILLIE";
    	ModelType[1]="SNIPER";
    	ModelType[2]="LMG";
    	ModelType[3]="ASSAULT";
    	ModelType[4]="SHOTGUN";
    	ModelType[5]="SMG";
    	ModelType[6]="RIOT";
    	if(Type==7)
                  {
                    MyTeam=randomint(2);Type=randomint(7);
                  }
    	team=get_enemy_team(self.team);if(MyTeam)team=self.team;
    	self detachAll();
    	[[game[team+"_model"][ModelType[Type]]]]();
    }

  4. #4
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    @darkorlegend still syntax error

    and yamato i really want a riot body and a sniper head as a model and your code wont do that or does it?
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  5. #5
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    Quote Originally Posted by pyrozombie View Post
    @darkorlegend still syntax error

    and yamato i really want a riot body and a sniper head as a model and your code wont do that or does it?
    It doesnt,

  6. #6
    Nachos's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Between Equator and The North Pole
    Posts
    2,984
    Reputation
    176
    Thanks
    919
    My Mood
    Blah
    @darkorlegend Don't ask for thanks. You can be sure that people wont thank you when you ask for it... Reversed psychology


    The lines in my Steam are i's

  7. #7
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    but does anyone knows whats wrong? did i use the wrong codes or what?
    press thanks if i helped you.

    steam: pyro1012 (in game name is Undutchable)

    todo list:
    100 posts :
    250 posts :
    500 posts :
    750 posts :
    1000 posts :
    get 100 thanks :
    create a modd :
    create a camo :
    create a program :

  8. #8
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    ...

    You added the model to the level, not to the player

  9. #9
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    Epic fail thanks gone have a look when iam home!

    changed level thread to self thread still don't work
    Last edited by pyrozombie; 06-26-2011 at 08:31 AM.

  10. #10
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    I tryd to fix for you.
    (On an very small laptop and hard to see...)
    So I migh not got it all right but you see what I mean with this:
    Code:
    #include maps\mp\_utility;
    
    MapModels()
    {
    	if(getDvar("mapname") == "mp_afghan")
    { /** Afghan **/
    		
    self thread Afghan();
    	}
    else
    {
    	if(getDvar("mapname") == "mp_boneyard")
    { /** Scrapyard **/
    		self thread Scrapyard();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_brecourt")
    { /** Wasteland **/
    		self thread Wasteland();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_checkpoint")
    { /** Karachi **/
    		self thread Karachi();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_derail")
    { /** Derail **/
    		self thread Derail();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_estate")
    { /** Estate **/
    		self thread Estate();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_favela")
    { /** Favela **/
    		self thread Favela();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_highrise")
    { /** HighRise **/
    		self thread HighRise();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_nightshift")
    { /** Skidrow **/
    		self thread Skidrow();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_invasion")
    { /** Invasion **/
    		self thread Invasion();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_quarry")
    { /** Quarry **/
    		self thread Quarry();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_rundown")
    { /** Rundown **/
    		self thread Rundown();   
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_rust")
    { /** Rust **/
    		self thread Rust();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_subbase")
    { /** SubBase **/
    		self thread SubBase();
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_terminal")
    { /** Terminal **/
    		self thread Terminal();       
    	}
    }
    else
    {
    	if(getDvar("mapname") == "mp_underpass")
    { /** Underpass **/
    		self thread Underpass();
    	}
    }
    }
            	
    
    Afghan() //Big A not small...
    {
    self attach("head_op_arab_sniper", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
    
    Scrapyard()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    } 
    
    Wasteland()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
    
    Karachi()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
    
    Derail()
    {
    self attach("head_op_sniper_ghillie_arctic", j_head);
    self setmodel("mp_body_riot_tf141_arctic");
    }
    
    Estate()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }
     
    Favela()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Highrise()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Skidrow()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
     
    Invasion()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arab");
    }
     
    Quarry()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rundown()
    {
    self attach("head_allies_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Rust()
    {
    self attach("head_op_sniper_ghillie_desert", j_head);
    self setmodel("mp_body_riot_tf141_desert");
    }
     
    Subbase()
    {
    self attach("head_allies_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_arctic");
    }
    
    Terminal()
    {
    self attach("head_op_sniper_ghillie_urban", j_head);
    self setmodel("mp_body_riot_op_airborne");
    }
    
    Underpass()
    {
    self attach("head_op_sniper_ghillie_forest", j_head);
    self setmodel("mp_body_riot_tf141_forest");
    }

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A