Thread: Some Codes

Results 1 to 6 of 6
  1. #1
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic

    Some Codes

    Hey guys,

    I need some codes:
    1. How can i make the players on the radar all blue instread of green(same like friends in-game).
    2. How to change the score colour(the popup of the exp its now yellow).
    3. With custom killstreaks got a problem if i give a nuke and u die its away but u can still hear the voice that u got a nuke but u cant see it or use it.

    Thanks for Helping.

  2. #2
    KickerOfAsses's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    5
    My Mood
    Lurking
    1. I believe you have to do this like a texture mod, so check that forum.
    2. No clue.
    3. Probably using takeAllWeapons(), which has been giving me the same issue.

  3. #3
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    You mean this Dvars for scoreboard colour??


    Code:
                    setDvar("cg_ScoresPing_LowColor", "1 0 0 1");
                    setDvar("cg_ScoresPing_HighColor", "1 0 0 1");  //red
                    setDvar("ui_playerPartyColor", "1 0 0 1");
                    setDvar("cg_scoreboardMyColor", "1 0 0 1");

  4. #4
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    i wasnt talking about scoreboard said radar u know the moving arrows?
    i want them all in blue not green

  5. #5
    Yamato's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    839
    Reputation
    13
    Thanks
    152
    My Mood
    Amazed
    This is _friendicons.gsc, what you are searching is here:

    Code:
    init()
    {
    	// Draws a team icon over teammates
    	level.drawfriend = 0;
    
    	game["headicon_allies"] = maps\mp\gametypes\_teams::getTeamHeadIcon( "allies" );
    	game["headicon_axis"] = maps\mp\gametypes\_teams::getTeamHeadIcon( "axis" );
    	
    	precacheHeadIcon( game["headicon_allies"] );
    	precacheHeadIcon( game["headicon_axis"] );
    
    	precacheShader( "waypoint_revive" );
    	
    	level thread onPlayerConnect();
    	
    	for(;;)
    	{
    		updateFriendIconSettings();
    		wait 5;
    	}
    }
    
    onPlayerConnect()
    {
    	for(;;)
    	{
    		level waittill("connected", player);
    
    		player thread onPlayerSpawned();
    		player thread onPlayerKilled();
    	}
    }
    
    onPlayerSpawned()
    {
    	self endon("disconnect");
    	
    	for(;;)
    	{
    		self waittill("spawned_player");
    		
    		self thread showFriendIcon();
    	}
    }
    
    onPlayerKilled()
    {
    	self endon("disconnect");
    	
    	for(;;)
    	{
    		self waittill("killed_player");
    		self.headicon = "";
    	}
    }	
    
    showFriendIcon()
    {
    	if(level.drawfriend)
    	{
    		if(self.pers["team"] == "allies")
    		{
    			self.headicon = game["headicon_allies"];
    			self.headiconteam = "allies";
    		}
    		else
    		{
    			self.headicon = game["headicon_axis"];
    			self.headiconteam = "axis";
    		}
    	}
    }
    	
    updateFriendIconSettings()
    {
    	drawfriend = maps\mp\_utility::getIntProperty("scr_drawfriend", level.drawfriend);
    	if(level.drawfriend != drawfriend)
    	{
    		level.drawfriend = drawfriend;
    		updateFriendIcons();
    	}
    }
    
    updateFriendIcons()
    {
    	// for all living players, show the appropriate headicon
    	players = level.players;
    	for(i = 0; i < players.size; i++)
    	{
    		player = players[i];
    
    		if(isDefined(player.pers["team"]) && player.pers["team"] != "spectator" && player.sessionstate == "playing")
    		{
    			if(level.drawfriend)
    			{
    				if(player.pers["team"] == "allies")
    				{
    					player.headicon = game["headicon_allies"];
    					player.headiconteam = "allies";
    				}
    				else
    				{
    					player.headicon = game["headicon_axis"];
    					player.headiconteam = "axis";
    				}
    			}
    			else
    			{
    				players = level.players;
    				for(i = 0; i < players.size; i++)
    				{
    					player = players[i];
    	
    					if(isDefined(player.pers["team"]) && player.pers["team"] != "spectator" && player.sessionstate == "playing")
    						player.headicon = "";
    				}
    			}
    		}
    	}
    }

  6. #6
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    not really this is head icons not the radar arrows..