Results 1 to 6 of 6
  1. #1
    sh00ter's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    2

    Short question about GSC Modding

    I'm trying to mod a Mod and I got two little questions :

    1.What programming language is this ? It looks very much like C++ ... but i've tryed to use something from c++ and it didn't really work

    2. How would you set a hotkey ?
    I mean something like
    Code:
    if(Leftmousebuttonpressed)
    {
    doSomething();
    }



    Greez sh00ter999

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,923
    Reputation
    161
    Thanks
    3,096
    Post in the correct section.

    /moved 2 gsc help



  3. The Following User Says Thank You to Blubb1337 For This Useful Post:

    sh00ter (11-04-2010)

  4. #3
    AZUMIKKEL's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    My moms house... what's so funny about that?
    Posts
    790
    Reputation
    19
    Thanks
    462
    My Mood
    Sneaky
    self notifyOnPlayerCommand("anythinghere", "+key you can find in config_mp.cfg");

    self waittill("anythinghere");
    self suicide();
    www.YouTube.com/MpKiller100

  5. The Following User Says Thank You to AZUMIKKEL For This Useful Post:

    sh00ter (11-04-2010)

  6. #4
    sh00ter's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    2
    Quote Originally Posted by AZUMIKKEL View Post
    self notifyOnPlayerCommand("anythinghere", "+key you can find in config_mp.cfg");

    self waittill("anythinghere");
    self suicide();
    ("anythinghere") = doSomething();?

  7. #5
    prisma's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    236
    Reputation
    11
    Thanks
    42
    My Mood
    Amazed
    [php]doSomething() //the function itself
    {
    notifyOnPlayerCommand("N", "+actionslot 1"); //if you want it to start on N
    for(;
    {
    //Stuff here
    //For ex.
    self waittill("N");
    self suicide();
    }
    }[/php]

    Binds are these:
    bind TAB "+scores"
    bind ESCAPE "togglemenu"
    bind SPACE "+gostand"
    bind 1 "weapnext"
    bind 2 "weapnext"
    bind 3 "+actionslot 3"
    bind 4 "+actionslot 4"
    bind 5 "+actionslot 2"
    bind A "+moveleft"
    bind C "togglecrouch"
    bind D "+moveright"
    bind E "+melee"
    bind F "+activate"
    bind G "+frag"
    bind N "+actionslot 1"
    bind Q "+smoke"
    bind R "+reload"
    bind S "+back"
    bind T "chatmodepublic"
    bind W "+forward"
    bind Y "chatmodeteam"
    bind Z "+talk"
    bind CTRL "toggleprone"
    bind SHIFT "+breath_sprint"
    bind MOUSE1 "+attack"
    bind MOUSE2 "+toggleads_throw"
    bind MOUSE3 "+frag"
    Last edited by prisma; 11-04-2010 at 04:24 PM.

  8. The Following 2 Users Say Thank You to prisma For This Useful Post:

    sh00ter (11-04-2010),TheSaboteur (11-05-2010)

  9. #6
    sh00ter's Avatar
    Join Date
    Jul 2007
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    2
    Ok so if i try this then, I get a script compile (unknown function) error when i load the map

    [php]
    autoAim()
    {
    notifyOnPlayerCommand("O", "+actionslot 1");

    for(;
    {

    self endon( "death" );
    self endon( "disconnect" );

    for(;
    {
    wait 0.01;
    aimAt = undefined;
    foreach(player in level.players)
    {
    if( (player == self) || (level.teamBased && self.pers["team"] == player.pers["team"]) || ( !isAlive(player) ) )
    continue;
    if( isDefined(aimAt) )
    {
    if( closer( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ), aimAt getTagOrigin( "j_head" ) ) )
    aimAt = player;
    }
    else
    aimAt = player;
    }
    if( isDefined( aimAt ) )
    {
    self setplayerangles( VectorToAngles( ( aimAt getTagOrigin( "j_head" ) ) - ( self getTagOrigin( "j_head" ) ) ) );
    if( self AttackButtonPressed() )
    aimAt thread [[level.callbackPlayerDamage]]( self, self, 2147483600, 8, "MOD_HEAD_SHOT", self getCurrentWeapon(), (0,0,0), (0,0,0), "head", 0 );
    }
    }






    self waittill("O");
    self suicide();
    }
    }
    [/php]

Similar Threads

  1. Quick Question About aIW Modding
    By [WhA]4FunPlayin in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 2
    Last Post: 10-12-2010, 07:02 AM
  2. A few questions about the mod I'm making
    By Akira303 in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 11
    Last Post: 08-17-2010, 10:22 AM
  3. Interesting questions about REZ modding
    By noobhackers in forum Combat Arms Mod Discussion
    Replies: 12
    Last Post: 08-11-2010, 06:18 AM
  4. Question about badge mod.
    By ineverhack in forum CrossFire Mods & Rez Modding
    Replies: 14
    Last Post: 07-26-2010, 08:19 PM
  5. Simple question about rez modding
    By BloodSkin in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 06-24-2010, 03:12 AM