Thread: GSC coding help

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

    GSC coding help

    Hey guys! Thanks for helping me with my previous post, I finally got the problem solved, now I would like to know how to do another thing in which my little knowledge of GSC limits me.

    I would like to know how to code to give a special quantity of points to a player for killing someone special, for example:

    If player with name "x" is killed, then award 500 xp
    I personally think that it has to do with this piece of code:

    if ( level.teamBased )
    {
    registerScoreInfo( "kill", 100 );
    registerScoreInfo( "headshot", 100 );
    registerScoreInfo( "assist", 20 );
    registerScoreInfo( "suicide", 0 );
    registerScoreInfo( "teamkill", 0 );
    In which if a case is given, then award a different ammount of xp.

    Thank you very much, I am hoping to learn from you!
    Last edited by Brabomclaren; 06-11-2011 at 12:50 AM.

  2. #2
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    Yes, exactly there


    Code:
    	if ( level.teamBased )
    	{
    		registerScoreInfo( "kill", 500 );
    		registerScoreInfo( "headshot", 500 );
    		registerScoreInfo( "assist", 500 );
    		registerScoreInfo( "suicide", 500 );
    		registerScoreInfo( "teamkill", 500 );
    	}
    	else
    	{
    		registerScoreInfo( "kill", 500 );
    		registerScoreInfo( "headshot", 500 );
    		registerScoreInfo( "assist", 500 );
    		registerScoreInfo( "suicide", 500 );
    		registerScoreInfo( "teamkill", 500 );
    	}

  3. #3
    Brabomclaren's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    But how do I do it if, for example, you kill someone with an special property like it's name?

    If you kill "IPwnU" then award 500 xp to the killer, but if not, award the normal quantity (100), and even print in everyone's screen that the killer killed that person.
    Last edited by Brabomclaren; 06-11-2011 at 04:41 PM.

  4. #4
    Brabomclaren's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    4
    Reputation
    10
    Thanks
    0
    Could somebody help me please? or is it that it's not possible to code such a thing?
    Last edited by Brabomclaren; 06-12-2011 at 01:48 PM.

  5. #5
    pyrozombie's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    holland
    Posts
    351
    Reputation
    12
    Thanks
    62
    My Mood
    Cool
    first of all bagging is not allowed and don't think they like the big words

    and to mention someone you use @master131