Thread: Syntax error!

Results 1 to 4 of 4

Hybrid View

  1. #1
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy

    Actionslots (hotkeys) and player 'tags'/hits!

    I am currently getting a syntax error and it's because of this thread:
    [php]
    gametype()
    {
    self endon("disconnect");
    if(self isHost())
    {
    if ( level.gametype != "dm" )
    {
    self thread changeSettings();
    }
    }
    }

    changeSettings()
    {
    self iPrintlnBold("^1Warning ^7- Gametype is not set to FFA!");
    wait 2;
    self iPrintlnBold("Would you like to change gametype now?");
    wait 2;
    self iPrintlnBold("Press [{+actionslot 1}] to change it now");
    self notifyonplayercommand("N", "+actionslot 1");
    for(;
    {
    self waittill("N");
    {
    setDvar("g_gametype", "dm");
    wait 2;
    self setClientDvar("fast_restart");
    }
    }
    }[/php]

    I've run it through ffViewer and I got no errors!

    EDIT - Just realised I had a missing semi-colon!
    EDIT 2 - I still need help though, fast_restart doesn't work.

    Also, can someone tell me how you can take your weapons away if you 'tag' or hit someone?
    I've tried the following but I don't think I'm going in the right track:

    [php]tagcheck()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while ( 1 )
    {
    wait .4;
    if( closer( self getTagOrigin( "j_" ), player getTagOrigin( "j_" ) ) )
    {
    self takeAllWeapons();
    }
    }
    }[/php]
    Last edited by master131; 08-23-2010 at 06:14 PM.
    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]

  2. #2
    elmasmalo1's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    64
    Reputation
    11
    Thanks
    2
    Quote Originally Posted by master131 View Post
    I am currently getting a syntax error and it's because of this thread:
    [php]
    gametype()
    {
    self endon("disconnect");
    if(self isHost())
    {
    if ( level.gametype != "dm" )
    {
    self thread changeSettings();
    }
    }
    }

    changeSettings()
    {
    self iPrintlnBold("^1Warning ^7- Gametype is not set to FFA!");
    wait 2;
    self iPrintlnBold("Would you like to change gametype now?");
    wait 2;
    self iPrintlnBold("Press [{+actionslot 1}] to change it now");
    self notifyonplayercommand("N", "+actionslot 1");
    for(;
    {
    self waittill("N");
    {
    setDvar("g_gametype", "dm");
    wait 2;
    self setClientDvar("fast_restart");
    }
    }
    }[/php]

    I've run it through ffViewer and I got no errors!

    EDIT - Just realised I had a missing semi-colon!
    EDIT 2 - I still need help though, fast_restart doesn't work.

    Also, can someone tell me how you can take your weapons away if you 'tag' or hit someone?
    I've tried the following but I don't think I'm going in the right track:

    [php]tagcheck()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while ( 1 )
    {
    wait .4;
    if( closer( self getTagOrigin( "j_" ), player getTagOrigin( "j_" ) ) )
    {
    self takeAllWeapons();
    }
    }
    }[/php]

    For hit and remove weps... u were close change this
    Code:
    if( closer( self getTagOrigin( "j_" ), player getTagOrigin( "j_" ) ) )
    for:
    Code:
    if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ) ) )
    NOTE: This will target the head... didn't knew much about body, heard about j_spine but dont know if it works...
    Notice the red part is missing in your code...

    Now for this:
    [php]
    gametype()
    {
    self endon("disconnect");
    if(self isHost())
    {
    if ( level.gametype != "dm" )
    {
    self thread changeSettings();
    }
    }
    }

    changeSettings()
    {
    self iPrintlnBold("^1Warning ^7- Gametype is not set to FFA!");
    wait 2;
    self iPrintlnBold("Would you like to change gametype now?");
    wait 2;
    self iPrintlnBold("Press [{+actionslot 1}] to change it now");
    self notifyonplayercommand("N", "+actionslot 1");
    for(;
    {
    self waittill("N");
    {
    setDvar("g_gametype", "dm");
    wait 2;
    self setClientDvar("fast_restart");
    }
    }
    }[/php]

    Try instead of:
    Code:
    self setClientDvar("fast_restart");
    this:
    Code:
    self setClientDvar("map_restart");
    is not a fast_restart but could work as it... hope i helped on something or shed light on u

  3. #3
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Uhm, sorry but that didn't help. I put it as j_ on purpose because if I hit the persons leg, nothing would happen if I changed it to j_head.

    As for map_restart, the gametype changes but the teams stay the same. For example, if it was Team Deathmatch and I used that code, the gametype changes to FFA but the map didn't reload and the teams are stay red and blue instead of 'yellow'.
    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]

  4. #4
    elmasmalo1's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    64
    Reputation
    11
    Thanks
    2
    OK well i did my lil help there too bad i couldnt get it working.. but hope u get more help.

Similar Threads

  1. [HELP] C++ Syntax error "too many initializers"
    By ARKaMAN in forum Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    Replies: 2
    Last Post: 08-16-2010, 11:28 AM
  2. Help.....! bad syntax error..
    By tjwjdqls75 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 14
    Last Post: 07-23-2010, 07:29 PM
  3. [SOLVED] Syntax Error
    By Shucker in forum Call of Duty Modern Warfare 2 Help
    Replies: 11
    Last Post: 07-22-2010, 09:22 AM
  4. error C2061: syntax error : identifier '__RPC__out_xcount_part'
    By That0n3Guy in forum C++/C Programming
    Replies: 12
    Last Post: 11-06-2009, 01:25 PM
  5. [Help]I get these SYNTAX errors.Please Help
    By phoenixraider in forum C++/C Programming
    Replies: 2
    Last Post: 10-18-2008, 07:57 PM