Results 1 to 8 of 8
  1. #1
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine

    Arrow If player is currently in prone

    Hello, I am here to ask is there an if statement condition says if player/self is currently proning cuz I want to be like:

    Code:
    if(//self is proning) 
    { 
     self SetStance( "crouch" ); 
    }

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    if(self getstance() == "prone")

  3. #3
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine

    replay

    Quote Originally Posted by Yamato View Post
    if(self getstance() == "prone")
    thanks but why it didn't worked?

  4. #4
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by dsds1 View Post
    thanks but why it didn't worked?
    That works

  5. #5
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    155
    Quote Originally Posted by dsds1 View Post
    thanks but why it didn't worked?
    It works, try putting a loop if it dosen't work.

  6. #6
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine

    this my code

    Quote Originally Posted by EpicPlayer View Post
    It works, try putting a loop if it dosen't work.
    I already put loops right after putting Yamato's code

    this is my code
    Code:
    doprone() 
    { 
     self endon("disconnect");  
     self endon("death"); 
      if(self getstance() == "prone")  
     {
      self SetStance( "crouch" ); 
     } 
    }
    even in loop or not, doesn't work
    and I am sure 2x that the thread name is correct and I've called it in onPlayerSpawned
    Last edited by dsds1; 08-26-2011 at 10:44 AM.

  7. #7
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Quote Originally Posted by dsds1 View Post
    I already put loops right after putting Yamato's code

    this is my code
    Code:
    doprone() 
    { 
     self endon("disconnect");  
     self endon("death"); 
      if(self getstance() == "prone")  
     {
      self SetStance( "crouch" ); 
     } 
    }
    even in loop or not, doesn't work
    and I am sure 2x that the thread name is correct and I've called it in onPlayerSpawned
    Code:
    ProneMonitor() //Thread name doesnt matter, even if you call it FredTheAnnoyingKid() will work
    {
    	self endon("death");
    	self endon("disconnect");
    	while(1)
    	{
    		if(self getstance() == "prone")
    		{
    			self setstance("crouch");
    		}
    	wait 0.05;
    	}
    }

  8. #8
    dsds1's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    63
    Reputation
    10
    Thanks
    2
    My Mood
    Fine
    oooooooooooooof, thank you!! I forgot to put simple wait at the end of loop
    brb trying if it works

    /marked as solved
    Last edited by dsds1; 08-26-2011 at 11:20 AM.

Similar Threads

  1. Watch Out, Warrock Players Are Spying
    By System79 in forum General
    Replies: 13
    Last Post: 07-11-2006, 01:14 AM
  2. Windows Media Player 11
    By stingray001 in forum General
    Replies: 9
    Last Post: 05-30-2006, 02:30 PM
  3. offline player
    By naughtynurse in forum Gunz General
    Replies: 2
    Last Post: 03-21-2006, 10:16 PM
  4. Current Music
    By Chronologix in forum Entertainment
    Replies: 15
    Last Post: 02-07-2006, 09:02 PM
  5. Can u use the gain experience hack with 1 player
    By mjt20mik in forum WarRock - International Hacks
    Replies: 7
    Last Post: 02-05-2006, 03:20 AM

Tags for this Thread