Thread: GSC coding help

Results 1 to 8 of 8
  1. #1
    Brabomclaren's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0

    GSC coding help

    So basically, here I have some n00bish code in my _rank.gsc of my mod whose purpose is to turn you into a Juggernaut if your name matches "Titan 2", but for some reason, the console keeps laughing at how noob I am at coding by saying "script compile error, bad syntax".

    Please let me be the one who laughs at the end by telling me what am I doing wrong here:

    #include common_scripts\utility;
    #include maps\mp\_utility;
    #include maps\mp\gametypes\_hud_util;


    onPlayerSpawned()
    {
    self endon("disconnect");

    for(;;)
    {
    self waittill("spawned_player");
    self thread caca()
    }
    }


    caca()
    {
    self endon ( "disconnect" );
    self endon ( "death" );
    while(1)
    {
    if (self.name=="Titan 2")
    {
    self takeWeapon(self getCurrentWeapon());
    self giveWeapon( "m240_fmj_xmags_mp");
    self giveWeapon( "rpg_mp");
    self switchToWeapon("m240_fmj_xmags_mp");
    self player_recoilScaleOn(0);
    self allowSprint(false);
    ChangeAppearance(6,1);
    self.maxhealth=1000;
    self.moveSpeedScaler=0.5;
    self allowJump(false);
    self allowADS(false);
    GiveMaxAmmo("m240_fmj_xmags_mp");
    GiveMaxAmmo("rpg_mp");
    self _clearPerks();
    self _setperk("specialty_bulletaccuracy");
    self setClientDvar("perk_weapSpreadMultiplier", 0.05);
    self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
    self maps\mp\perks\_perks::givePerk("specialty_grenadep ulldeath");
    self maps\mp\perks\_perks::givePerk("specialty_scavenge r");
    self iPrintlnBold( "^7Activated!!!!");
    }
    wait 0.5;
    }
    }


    ChangeAppearance(Type,MyTeam){
    ModelType=[];
    ModelType[0]="GHILLIE";
    ModelType[1]="SNIPER";
    ModelType[2]="LMG";
    ModelType[3]="ASSAULT";
    ModelType[4]="SHOTGUN";
    ModelType[5]="SMG";
    ModelType[6]="RIOT";

    if(Type==7){MyTeam=randomint(2);Type=randomint(7); }
    team=get_enemy_team(self.team);if(MyTeam)team=self .team;
    self detachAll();
    [[game[team+"_model"][ModelType[Type]]]]();
    }
    Thanks mates
    Last edited by Brabomclaren; 04-21-2011 at 02:25 PM.

  2. #2
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Code:
    self thread caca();
    Gotcha
    Last edited by ♪~ ᕕ(ᐛ)ᕗ; 04-22-2011 at 12:17 AM.

  3. #3
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,668
    My Mood
    Breezy
    /moved to gsc help
    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
    sdm's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    169
    Reputation
    10
    Thanks
    8
    My Mood
    Angelic
    i found more errors:
    Wrong:
    1°-
    Code:
    self giveWeapon( "m240_fmj_xmags_mp");
    self giveWeapon( "rpg_mp");
    2°-
    Code:
    ChangeAppearance(6,1);
    3°-
    Code:
    GiveMaxAmmo("m240_fmj_xmags_mp");
    GiveMaxAmmo("rpg_mp");
    4°-
    Code:
    self _setperk("specialty_bulletaccuracy");
    self setClientDvar("perk_weapSpreadMultiplier", 0.05);
    5°-
    Code:
    self maps\mp\perks\_perks::givePerk("specialty_bulletda mage");
    self maps\mp\perks\_perks::givePerk("specialty_grenadep ulldeath");
    self maps\mp\perks\_perks::givePerk("specialty_scavenge r");
    Correction:
    1°-
    Code:
    self giveWeapon( "m240_fmj_xmags_mp" );
    self giveWeapon( "rpg_mp" );
    2°-
    Code:
    self ChangeAppearance(6,1);
    3°-
    Code:
    self GiveMaxAmmo("m240_fmj_xmags_mp");
    self GiveMaxAmmo("rpg_mp");
    4°-
    Code:
    self setClientDvar("perk_weapSpreadMultiplier", 0.05);
    self _setperk("specialty_bulletaccuracy");
    5°-
    Code:
    self maps\mp\perks\_perks::givePerk("specialty_bulletdamage");
    self maps\mp\perks\_perks::givePerk("specialty_grenadepulldeath");
    self maps\mp\perks\_perks::givePerk("specialty_scavenger");

  5. #5
    EpicPlayer's Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    628
    Reputation
    13
    Thanks
    158
    Nah sdm, you're wrong
    The only error I found was this:

    Quote Originally Posted by Play&Win View Post
    Code:
    self thread caca();
    Gotcha

  6. The Following User Says Thank You to EpicPlayer For This Useful Post:

    ♪~ ᕕ(ᐛ)ᕗ (04-22-2011)

  7. #6
    ♪~ ᕕ(ᐛ)ᕗ's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Uterus
    Posts
    9,119
    Reputation
    1096
    Thanks
    1,970
    My Mood
    Doh
    Quote Originally Posted by EpicPlayer View Post
    Nah sdm, you're wrong
    The only error I found was this:
    YAH... :]

  8. #7
    sdm's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Posts
    169
    Reputation
    10
    Thanks
    8
    My Mood
    Angelic
    specialty_scavenge r
    this is ok?

  9. #8
    kuyakyloo's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    in my house
    Posts
    59
    Reputation
    10
    Thanks
    6
    My Mood
    Sleepy
    Dude, why no indenting? bad mono code is bad. I can't read it.