Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored

    [Help]if statement help

    is there and if statement for location like
    Code:
    if((self.team == "axis") & (####,####,##))
    {
             do this
    }
    or some thing like that so basically if on axis team and at coordinates then do some thing

  2. #2
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    Quote Originally Posted by CrossfireHackCoder View Post
    lol What????????
    well that was helpful i mean i want the game to run a command if your at specific spot

  3. #3
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    He ment;
    If i am in axis team and if i stand on spot/selfgetOrigin(i think) xxx happens

  4. #4
    bomb21's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Unknown
    Posts
    57
    Reputation
    10
    Thanks
    22
    Code:
    if(self getOrigin() == (#,#,#))
    lala();
    
    or
    
    dist = 50;
    if(distance(self getOrigin(), (#,#,#)) < dist )
    lala();

  5. #5
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    Quote Originally Posted by bomb21 View Post
    Code:
    if(self getOrigin() == (#,#,#))
    lala();
    
    or
    
    dist = 50;
    if(distance(self getOrigin(), (#,#,#)) < dist )
    lala();
    just tested this it ether didn't work or i epically ailed

  6. #6
    ~Just IN~'s Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    self thread xbox360nolife() {
    Posts
    518
    Reputation
    11
    Thanks
    52
    My Mood
    Doh
    Umm.. did you change the "#"s?... Lolololo and removed/picked one of them.

  7. #7
    zxz0O0's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    209
    Reputation
    10
    Thanks
    136
    My Mood
    Aggressive
    [php]if(self.team=="axis" && self getOrigin()==(xx,xx,xx))
    {
    blablabal
    }[/php]
    [YOUTUBE]Ja7-WnJcMcs[/YOUTUBE]

  8. #8
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,331
    My Mood
    Breezy
    Code:
    if(self.team == "axis" && distance(self.origin, (###,###,###)) < 100)
    {
        //Do stuff here
    }
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  9. #9
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    ok now im sher that im going something wrong
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		if(self.team == "axis" && distance(self.origin, (1744,-299,3226)) < 100)
    		{
        			self freezeControls(true);
    		} 
    	}
    }
    but i dont see it

  10. #10
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    Quote Originally Posted by XFL View Post
    ok now im sher that im going something wrong
    Code:
    onPlayerSpawned()
    {
    	self endon("disconnect");
    
    	for(;;)
    	{
    		self waittill("spawned_player");
    		if(self.team == "axis" && distance(self.origin, (1744,-299,3226)) < 100)
    		{
        			self freezeControls(true);
    		} 
    	}
    }
    but i dont see it
    If u spawn at the cordinates as axis you will be frozen...
    No sense and its almost impossible to spawn on the cordinates.
    Do you mean u want to change spawn points or am i wayyyy wrong?

  11. #11
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    Quote Originally Posted by TheLynx View Post
    If u spawn at the cordinates as axis you will be frozen...
    No sense and its almost impossible to spawn on the cordinates.
    Do you mean u want to change spawn points or am i wayyyy wrong?
    way wrong i want it to be if im on the axis and at coordinates then freeze player

  12. #12
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    Quote Originally Posted by XFL View Post
    way wrong i want it to be if im on the axis and at coordinates then freeze player
    Then don't call this @onplayerspawned()
    Make a new thread like
    [php]
    CheckPlace()
    {
    for(;
    {

    if(self.team == "axis" && distance(self.origin, (1744,-299,3226)) < 100)
    self freezeControls(true);
    else
    wait 1;
    }
    }
    [/php]
    add [php]self thread CheckPlace()[/php] @OnplayerSpawned()
    Last edited by TheLynx; 10-31-2010 at 12:26 PM.

  13. The Following User Says Thank You to TheLynx For This Useful Post:

    XFL (10-31-2010)

  14. #13
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    tested it and it worked

    dose any one know a code to make only one team able to use a flag

  15. #14
    TheLynx's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Sverige
    Posts
    366
    Reputation
    10
    Thanks
    42
    My Mood
    Happy
    Quote Originally Posted by XFL View Post
    tested it and it worked

    dose any *one* know a code to make only one team able to use a flag

    Glad i could help

    Checking the flag thing.
    Edit: Soooooooo i don't know if this works but here we go.
    After a while this came to my mind
    Not syntaxed checked

    To Create a Flag for opfor/axis only just add
    [php]AxisElevator((#, #, #), (#, #, #), (#, #, #));[/php]
    And for TF 141/allies
    [php]AlliesElevator((#, #, #), (#, #, #), (#, #, #));[/php]

    Axis = Red flags
    Allies = Blue flags

    Add this to somewhere in the MapEdit (like bottom )

    [php]AxisElevator(enter, exit, angle)
    {
    flag = spawn( "script_model", enter );
    flag setModel( level.elevator_model["exit"] );
    wait 0.01;
    flag = spawn( "script_model", exit );
    flag setModel( level.elevator_model["exit"] );
    wait 0.01;
    self thread AxisElevatorThink(enter, exit, angle);
    }

    AlliesElevator(enter, exit, angle)
    {
    flag = spawn( "script_model", enter );
    flag setModel( level.elevator_model["enter"] );
    wait 0.01;
    flag = spawn( "script_model", exit );
    flag setModel( level.elevator_model["enter"] );
    wait 0.01;
    self thread AlliesElevatorThink(enter, exit, angle);
    }

    AxisElevatorThink(enter, exit, angle)
    {
    self endon("disconnect");
    while(1)
    {
    foreach(player in level.players)
    {

    if(self.team == "axis" && distance(enter, player.origin) <= 50){
    player SetOrigin(exit);
    player SetPlayerAngles(angle);
    }
    }
    wait .25;
    }
    }

    AlliesElevatorThink(enter, exit, angle)
    {
    self endon("disconnect");
    while(1)
    {
    foreach(player in level.players)
    {

    if(self.team == "allies" && distance(enter, player.origin) <= 50){
    player SetOrigin(exit);
    player SetPlayerAngles(angle);
    }
    }
    wait .25;
    }
    }[/php]
    Last edited by TheLynx; 10-31-2010 at 04:15 PM.

  16. #15
    XFL's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    95
    Reputation
    10
    Thanks
    5
    My Mood
    Bored
    Quote Originally Posted by TheLynx View Post

    Glad i could help

    Checking the flag thing.
    Edit: Soooooooo i don't know if this works but here we go.
    After a while this came to my mind
    Not syntaxed checked

    To Create a Flag for opfor/axis only just add
    [php]AxisElevator((#, #, #), (#, #, #), (#, #, #));[/php]
    And for TF 141/allies
    [php]AlliesElevator((#, #, #), (#, #, #), (#, #, #));[/php]

    Axis = Red flags
    Allies = Blue flags

    Add this to somewhere in the MapEdit (like bottom )

    [php]AxisElevator(enter, exit, angle)
    {
    flag = spawn( "script_model", enter );
    flag setModel( level.elevator_model["exit"] );
    wait 0.01;
    flag = spawn( "script_model", exit );
    flag setModel( level.elevator_model["exit"] );
    wait 0.01;
    self thread AxisElevatorThink(enter, exit, angle);
    }

    AlliesElevator(enter, exit, angle)
    {
    flag = spawn( "script_model", enter );
    flag setModel( level.elevator_model["enter"] );
    wait 0.01;
    flag = spawn( "script_model", exit );
    flag setModel( level.elevator_model["enter"] );
    wait 0.01;
    self thread AlliesElevatorThink(enter, exit, angle);
    }

    AxisElevatorThink(enter, exit, angle)
    {
    self endon("disconnect");
    while(1)
    {
    foreach(player in level.players)
    {

    if(self.team == "axis" && distance(enter, player.origin) <= 50){
    player SetOrigin(exit);
    player SetPlayerAngles(angle);
    }
    }
    wait .25;
    }
    }

    AlliesElevatorThink(enter, exit, angle)
    {
    self endon("disconnect");
    while(1)
    {
    foreach(player in level.players)
    {

    if(self.team == "allies" && distance(enter, player.origin) <= 50){
    player SetOrigin(exit);
    player SetPlayerAngles(angle);
    }
    }
    wait .25;
    }
    }[/php]
    just tested that didn't work but ty for trying and for the other one

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help Request] Combat arms Vid help
    By djw111 in forum Combat Arms Help
    Replies: 4
    Last Post: 12-24-2011, 06:06 PM
  2. [Help Request] Ajuda / Help
    By - Battery' in forum Combat Arms BR Coding Help
    Replies: 3
    Last Post: 04-22-2011, 08:15 PM
  3. [Help Request] Help my!
    By Windowns7 in forum Combat Arms BR Coding Help
    Replies: 2
    Last Post: 04-18-2011, 02:41 PM
  4. [help]For each statement[Closed]
    By ppl2pass in forum Visual Basic Programming
    Replies: 1
    Last Post: 04-22-2010, 09:04 PM
  5. Help in VB 2005: 'As Any' is not supported in 'Declare' statements
    By yogilek in forum WarRock - International Hacks
    Replies: 2
    Last Post: 09-28-2007, 03:12 PM