Results 1 to 4 of 4
  1. #1
    L33tHaxorCod3r's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    73
    Reputation
    10
    Thanks
    46
    My Mood
    Blah

    Can someone help me with this code

    So I am working on my next release for you guys but it will take a bit longer b/c of 1.3 coming out in 2weeks.

    I am starting chat commands and i got the activators down with this

    if(par1Str.equalsIgnoreCase("-Fastbreak"))
    {
    Variables.Fastbreak =!Variables.Fastbreak;
    addChatMessage("\247c[BrightLight]\247fFastbreak Toggled!");
    }


    When i type it to deactivate it sais it again "Fastbreak Toggled!"

    But i want it to say "Fastbreak Deactivated" when i type it again and it turns off

    Does anyone know how to get it so it sais that when i retype it to turn it off?

  2. #2
    Nico's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Germany :D
    Posts
    15,918
    Reputation
    1121
    Thanks
    8,617
    if(Variables.Fastbreak)
    addChatMessage("Enabled")
    else
    addChatMessage("Disabled")

    pseudocode.

  3. #3
    Psychotic's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    13,825
    Reputation
    4234
    Thanks
    6,055
    It's because you never defined what the variable is to deactivate it, and what it will say when it deactivates.






    Super User since 02.02.2020
    Global Moderator since 09.23.2017
    Moderator since 09.01.2016
    Minion+ since 07.22.2016

    Marketplace Minion since 06.09.2016
    Trove Minion since 06.06.2016
    Middleman since 04.21.2016
    Social Engineering Minion since 02.03.2016
    News FO Freelancer From 11.08.2015 to 07.23.2016
    News FO Head Editor From 08.23.2015 to 11.08.2015
    News FO Head Editor From 07.19.2012 to 08.11.2014
    MPGH News and News FO Founder
    Programming Minion From Unknown to 04.23.2013
    Minecraft Minion From 09.19.2012 to 04.23.2013
    Member since 05.13.2012



  4. #4
    L33tHaxorCod3r's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    73
    Reputation
    10
    Thanks
    46
    My Mood
    Blah
    @Nico i did that once and that means if i type anything other than -Fastbreak it will say fastbreak deactiavted

Similar Threads

  1. [Help] Can someone help me work this code
    By Jordyr in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 8
    Last Post: 09-25-2011, 11:55 AM
  2. [Solved]Umm can someone help me with this?
    By lewis1994 in forum CrossFire Help
    Replies: 7
    Last Post: 01-19-2011, 03:12 PM
  3. Error, can someone help me with this error.
    By tien2005 in forum CrossFire Help
    Replies: 5
    Last Post: 10-03-2010, 02:02 PM
  4. can someone help me with this?
    By sneezing panda in forum Suggestions, Requests & General Help
    Replies: 2
    Last Post: 09-25-2009, 05:28 AM
  5. can someone help me with this plz?
    By phantom718 in forum Combat Arms Hacks & Cheats
    Replies: 8
    Last Post: 09-02-2008, 02:43 PM