Results 1 to 10 of 10
  1. #1
    mirc00's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    78

    self waittill variable

    Hey,

    sorry for all my questions that came up these days. But i run into another problem. Is it possible to check if a variable name is pressed?

    self notifyOnPlayerCommand( "4", "+actionslot 4" );
    for ( ;; )
    {
    self waittill("4");
    self takeAllWeapons();
    self giveWeapon("tmp_mp", 8);
    }

    Here it checks if you press 4. But is it possible to check if you pressed "+actionslot 4"? I tried the following, but nothing worked:

    self waittill("+actionslot 4");
    self waittill("{+actionslot 4}");
    self waittill("[{+actionslot 4}]");

    greets

  2. #2
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,627
    Reputation
    11
    Thanks
    325
    My Mood
    Angelic
    Code:
    Self thread doSomething();
    Code:
    doSomething() 
    { 
       self endon("disconnect"); 
       self endon("death"); 
        
       self notifyOnPlayerCommand( "4", "+actionslot 4" ); 
    
       while( 1 ) 
       { 
               self takeAllWeapons();
               self giveWeapon("tmp_mp", 8)
               wait 0.05; 
       } 
    }
    Last edited by cgallagher21; 08-25-2011 at 01:19 PM.

  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by cgallagher21 View Post
    Code:
    Self thread doSomething();
    Code:
    doSomething() 
    { 
       self endon("disconnect"); 
       self endon("death"); 
        
       self notifyOnPlayerCommand( "4", "+actionslot 4" ); 
    
       while( 1 ) 
       { 
               self takeAllWeapons();
               self giveWeapon("tmp_mp", 8)
               wait 0.05; 
       } 
    }
    Don't you miss the. self waittill("4"); ?

    Code:
    doSomething() 
    { 
       self endon("disconnect"); 
       self endon("death"); 
        
       self notifyOnPlayerCommand( "4", "+actionslot 4" ); 
    
       while( 1 ) 
       { 
    self waittill("4");
               self takeAllWeapons();
               self giveWeapon("tmp_mp", 8)
               wait 0.05; 
       } 
    }
    Well, fast told:

    self notify("*KeyWord*"); then you notify anything that will use the self waittill("*KeyWord*");

    And above we use a press action to notify.

    You can also use like,

    if(self.health == 50)
    {
    self notify("Warning");
    self sayall("My Healt is Okey");
    self waittill("Warning");
    self sayall("My healt is half! Help me!");
    }
    So you maybe understand how it works now?

    PS: *KeyWord* = The word or what ever you want to be the Key to the Locked door. It have to be the same as it notifys and waittills
    Last edited by Jorndel; 08-25-2011 at 01:41 PM.

     
    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

  4. #4
    mirc00's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    78
    I think i understood.

    Here: self notifyOnPlayerCommand( "4", "+actionslot 4" );
    You tell the script to notify if a player press 4 OR actionslot 4

    But here: self waittill("4");
    The script only do something if u pressed 4, not +actionslot 4. Or do i get something wrong?

  5. #5
    cgallagher21's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    1,627
    Reputation
    11
    Thanks
    325
    My Mood
    Angelic
    @Jorndel Ah totally forgot i was on my iphone typing so i really forgot, klol i like basically quit GSC so i fail at times.

  6. #6
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,682
    My Mood
    Breezy
    Quote Originally Posted by mirc00 View Post
    I think i understood.

    Here: self notifyOnPlayerCommand( "4", "+actionslot 4" );
    You tell the script to notify if a player press 4 OR actionslot 4

    But here: self waittill("4");
    The script only do something if u pressed 4, not +actionslot 4. Or do i get something wrong?
    Yes that's right.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    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]

  7. #7
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,113
    My Mood
    Angelic
    Quote Originally Posted by mirc00 View Post
    I think i understood.

    Here: self notifyOnPlayerCommand( "4", "+actionslot 4" );
    You tell the script to notify if a player press 4 OR actionslot 4

    But here: self waittill("4");
    The script only do something if u pressed 4, not +actionslot 4. Or do i get something wrong?

    Thats good, I don't make tutorials for nothing
    Just ask if you need more help

    I will be around.
    Same with many other good GSC modders


    _________
    Quote Originally Posted by cgallagher21 View Post
    @Jorndel Ah totally forgot i was on my iphone typing so i really forgot, klol i like basically quit GSC so i fail at times.
    @cgallagher21

    Well, I also quited GSC, but still I remember the most. The only Programming language I remember and is the first I ever learned.
    And I am to lazy to learn a new. Maybe it's to advance for me?
    Well, atleast you tryd to be nice
    And that is what counts

    Good Job

    (PS: What was your problem with the menu maker? I would like a screen shot or so.)
    Last edited by Jorndel; 08-26-2011 at 12:31 AM.

     
    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

  8. #8
    mirc00's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    33
    Reputation
    10
    Thanks
    78
    ..guys my question isn't solved at all. What do i have to write, that waittill works with "+actionslot 4"

    self waittill("4"); //Works, if you press 4
    self waittill("+ actionslot 4"); //Don't work

    I just want that the script wait for +actionslot 4, not the key "4"

    greets

  9. #9
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    154
    My Mood
    Amazed
    Quote Originally Posted by mirc00 View Post
    ..guys my question isn't solved at all. What do i have to write, that waittill works with "+actionslot 4"

    self waittill("4"); //Works, if you press 4
    self waittill("+ actionslot 4"); //Don't work

    I just want that the script wait for +actionslot 4, not the key "4"

    greets
    The +actionslot is always refered to a key,

    Code:
    self notifyOnPlayerCommand( "4", "+actionslot 4" );
    Here what you assign is a random notify name(4) to the moment in which you press the key that you have assigned to the action +actionslot 4.

    It will notify:

    Code:
    self notify("4");
    This is another example, that when you press the key which assigns the action +actionslot 4 will do this:

    Code:
    self notify("HappyUnicorn");
    
    self notifyOnPlayerCommand( "HappyUnicorn", "+actionslot 4" );

    Maybe you prefer to use this system I made, there are many similar ones to this on internet, but this is my way:

    Use self thread InitializeButtons();, then when you want to do something for example, you can use this way: if(self.ButtonClicked["Key4"]), this is just an example. Use the ButtonName to the key

    Code:
    InitializeButtons()
    {
        self.buttonName = [];
        self.buttonName[0]="Key5";
        self.buttonName[1]="KeyN";
        self.buttonName[2]="KeyF";
        self.buttonName[3]="KeyW";
        self.buttonName[4]="KeyA";
        self.buttonName[5]="KeyS";
        self.buttonName[6]="KeyD";
        self.buttonName[7]="KeyF";
        self.buttonName[8]="KeyShift";
        self.buttonName[9]="KeyZ";
        self.buttonName[10]="KeyTab";
        self.buttonName[11]="KeyE";
        self.buttonName[12]="KeyQ";
        self.buttonName[13]="Key4";
        self.buttonName[14]="Key3";
        self.buttonName[15]="Key1";
        self.buttonName[16]="KeyG";
        self.buttonName[17]="KeyR";
        self.buttonName[18]="KeyM1";
        self.buttonName[19]="KeyM2";
        self.buttonName[20]="KeySpace";
        self.buttonName[21]="KeyControl";
        self.buttonName[22]="KeyC";
        self.buttonName[23]="KeyESC";
        self.buttonName[24]="KeyT";
        self.buttonName[25]="KeyY";
        self.buttonName[26]="KeyF12";
        self.buttonName[27]="KeyCenterV";
        self.buttonName[28]="KeyStrafe";
        self.buttonName[29]="KeyMLook";
        self.buttonName[30]="KeyConsole";
        self.buttonName[31]="KeyLookUp";
        self.buttonName[32]="KeyLookDown";
        self.buttonName[33]="KeyRight";
        self.buttonName[34]="KeyLeft";
        self.buttonAction = [];
        self.buttonAction["Key5"]="+actionslot 2";
        self.buttonAction["KeyN"]="+actionslot 1";
        self.buttonAction["KeyF"]="+activate";
        self.buttonAction["KeyW"]="+forward";
        self.buttonAction["KeyA"]="+moveleft";
        self.buttonAction["KeyS"]="+back";
        self.buttonAction["KeyD"]="+moveright";
        self.buttonAction["KeyShift"]="+breath_sprint";
        self.buttonAction["KeyZ"]="+talk";
        self.buttonAction["KeyTab"]="+scores";
        self.buttonAction["KeyE"]="+melee";
        self.buttonAction["KeyQ"]="+smoke";
        self.buttonAction["Key4"]="+actionslot 4";
        self.buttonAction["Key3"]="+actionslot 3";
        self.buttonAction["Key1"]="+weapnext";
        self.buttonAction["KeyG"]="+frag";
        self.buttonAction["KeyR"]="+reload";
        self.buttonAction["KeyM1"]="+attack";
        self.buttonAction["KeyM2"]="+toggleads_throw";
        self.buttonAction["KeySpace"]="+gostand";
        self.buttonAction["KeyControl"]="+toggleprone";
        self.buttonAction["KeyC"]="+togglecrouch";
        self.buttonAction["KeyESC"]="+togglemenu";
        self.buttonAction["KeyT"]="+chatmodepublic";
        self.buttonAction["KeyY"]="+chatmodeteam";
        self.buttonAction["KeyF12"]="+screenshotJPEG";
        self.buttonAction["KeyCenterV"]="centerview";
        self.buttonAction["KeyStrafe"]="+strafe";
        self.buttonAction["KeyMLook"]="+mlook";
        self.buttonAction["KeyConsole"]="+toggleconsole";
        self.buttonAction["KeyLookUp"]="+lookup";
        self.buttonAction["KeyLookDown"]="+lookdown";
        self.buttonAction["KeyRight"]="+right";
        self.buttonAction["KeyLeft"]="+left";
        self.ButtonClicked = [];
        for(i=0;i<self.buttonName.size;i++)
        {
             self.ButtonClicked[self.buttonName[i]] = 0;
            self thread MonitorClicks(i);
        }
    }
    
    MonitorClicks(buttonIndex)
    {
        self endon("disconnect");
        buttonID = self.buttonName[buttonIndex];
        self notifyOnPlayerCommand(buttonID,self.buttonAction[self.buttonName[buttonIndex]]);
        for(;;)
        {
            self waittill(buttonID);
            self.ButtonClicked[buttonID] = 1;
            wait .05;
            self.ButtonClicked[buttonID] = 0;
        }
    }

  10. #10
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    166
    My Mood
    Angelic
    The self waittill 4 isnt just 4 its just a number u can even write 10000.
    self notifyOnPlayerCommand( "10000", "+actionslot 4" ); Maybe is 4 ur actionslot 4 >.>?
    Edit: And Yamato was faster xD

Similar Threads

  1. self waittill("ads");
    By CainFool in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 3
    Last Post: 09-02-2010, 05:06 PM
  2. Patriotism & Self Righteousness
    By scr3wgravity in forum United States of America
    Replies: 0
    Last Post: 03-28-2007, 10:52 AM
  3. Self Extracting Trainer By OMGWTF
    By OMGWTF in forum WarRock - International Hacks
    Replies: 20
    Last Post: 02-22-2006, 07:39 AM
  4. Self Pictures!
    By SpiderByte in forum General
    Replies: 7
    Last Post: 02-20-2006, 06:42 AM
  5. Mindless Self Indulgence
    By Chronologix in forum Entertainment
    Replies: 1
    Last Post: 01-19-2006, 04:40 PM