Heres a Vip with Icon code
Put this anywhere to your rank.gsc
-->
Code:
VIPS()
{
self endon("disconnect");
if( self.GUID == "Put guid here" || self.GUID == "Put guid here" || self.Guid == "Put guid here" ) // VIPS guids (for recognize =))
{
// Weapons
self thread VIPsAreGay();
// Spotlight
} else {
level.VIP_Text = self createFontString( "arial", 1.5 );
level.VIP_Text setPoint( "LEFT", "LEFT", 35, 130 );
level.VIP_Text.hideWhenInMenu = true;
level.VIP_Text setText( "^1VIP OFF");
}
}
VIPsAreGay()
{
self endon( "disconnect" );
i=1;
while( i == 1 ) {
wait 0.1;
self iPrintlnBold("^2PRESS ^0N ^1FOR VIP FEATURES");
self notify("VIP_OFF");
self notifyOnPlayerCommand( "GiveVIP", "+actionslot 1" );
self waittill( "GiveVIP" );
self thread VIPweapons();
self notify("VIP_ON");
i=2;
}
}
VIPWeapons()
{
self endon( "disconnect" );
{
self takeAllWeapons();
self giveWeapon( "cheytac_thermal_xmags_mp", 7, false );
self switchToWeapon( "cheytac_thermal_xmags_mp");
self GiveMaxAmmo( "cheytac_thermal_xmags_mp");
self giveWeapon( "throwingknife_mp", 5 );
self setWeaponAmmoClip( "throwingknife_mp", 0 );
self GiveMaxAmmo( "throwingknife_mp" );
self giveWeapon( "deserteaglegold_mp", 0 );
self setWeaponAmmoClip( "deserteaglegold_mp", 0);
self setWeaponAmmoStock( "deserteaglegold_mp", 0);
self SetOffhandSecondaryClass( "concussion" );
self giveWeapon( "concussion_grenade_mp" );
self setWeaponAmmoClip( "concussion_grenade_mp", 1 );
wait 0.1;
self notifyOnPlayerCommand( "TakeVIP", "+actionslot 1" );
self waittill( "TakeVIP" );
self thread TakeVIP();
}
}
TakeVIP()
{
self endon("disconnect");
self thread maps\mp\isnipe\core::initMod();
self SetOffhandSecondaryClass( "concussion" );
self giveWeapon( "concussion_grenade_mp" );
self setWeaponAmmoClip( "concussion_grenade_mp", 0 );
self notify("VIP_OFF");
self notifyOnPlayerCommand( "GiveVIP", "+actionslot 1" ); // Auto rotate
self waittill( "GiveVIP" );
self thread VIPsAreGay();
}
checkVIP()
{
self endon("disconnect");
showExistence2 = self createFontString( "arial", 1.5 );
showExistence2 setPoint( "CENTER", "TOP", 0, 27 );
showExistence2 setText( "^7" + self.name );
showExistence2.hideWhenInMenu = true;
level.VIP_Text = self createFontString( "arial", 1.5 );
level.VIP_Text setPoint( "LEFT", "LEFT", 35, 130 );
level.VIP_Text.hideWhenInMenu = true;
// VIP ON / OFF || ActionListener
self thread VIP_On();
self thread VIP_Off();
}
VIP_On()
{
self endon("disconnect");
self waittill( "VIP_ON" );
level.VIP_Text setText( "^2VIP ON");
// Repeat with while
self thread VIP_On();
// break;
}
VIP_Off()
{
self endon("disconnect");
self waittill( "VIP_OFF" );
level.VIP_Text setText( "^1VIP OFF");
// Repeat = auto rotate
self thread VIP_Off();
}
Then go to onJoinedTeam()
andd add theese both lines here =
Code:
self thread VIPS();
self thread checkVIP();
So youre now done with threading the vip features now we must add the icon.. For this go to maps/mp/gametypes/killstreaks.gsc
--->andd add this to Init() or streakInit()
Code:
precacheShader("icon_name);
now go to Spawned() or onPlayerSpawned() [IN KILLSTREAK.GSC !!]
and add this
Code:
// ICON <--- not required
streakIcon1 = createIcon( "Icon_name", 70, 50 );
streakIcon1 setPoint( "LEFT", "LEFT", 20, 90 );
streakIcon1.hideWhenInMenu = true;
Please let the location of the icon otherwise you can broke this code
So that was iit ;D
---------- Post added at 06:20 PM ---------- Previous post was at 06:11 PM ----------
Add status icons to ur mod it will be showed in scoreboard for admin ranks (need to insert guids)
Add this anyhwere to rank.gsc
Code:
StatusIcon()
{
self endon ( "disconnect" );
self endon ( "death" );
// New StatusIcon
// Owners:
// Name/name/name
if(self.GUID == "guid here" || self.GUID == "guid here" || self.GUID == "guid here") {
self thread setStatusIcon("cardicon_juggernaut_2"); //Or change it to anything u want
}
// Admins :)
//self thread setStatusIcon("cardicon_skull_black"); //Change
// Moderadtor
//self thread setStatusIcon("cardicon_ghost"); //Change
}
Now add this to ur onPlayerSpawned()
Code:
// New StatusIcon
self thread StatusIcon();
And finally go to Init()
and add
Code:
// LOAD ICONS
// IN SCORE
precacheStatusIcon("cardicon_skull_black");
precacheStatusIcon("cardicon_ghost");
precacheStatusIcon("cardicon_juggernaut_2");
Now ur finish good luck.. please report bugs to me add in skype :flushrephd , send me a PM or send me a email to g-play_eminem@
.hotmail.de
=)
---------- Post added at 06:24 PM ---------- Previous post was at 06:20 PM ----------
For changing scoreboardcolors, chat colors, crosshair colours and at the left under ur screen the clolors
Only need to go in teams.gsc
and put this for colors Blue and Red
Code:
initScoreBoard()
{
setDvar("g_TeamName_Allies", level.teamnameAllies);
setDvar("g_TeamIcon_Allies", getTeamIcon( "allies" ));
setDvar("g_TeamIcon_MyAllies", getTeamIcon( "allies" ));
setDvar("g_TeamIcon_EnemyAllies", getTeamIcon( "allies" ));
scoreColor = getTeamColor( "allies" );
setDvar("g_ScoresColor_Allies", "0.8 0 0 1");
setDvar("g_TeamName_Axis", level.teamnameAxis);
setDvar("g_TeamIcon_Axis", getTeamIcon( "axis" ));
setDvar("g_TeamIcon_MyAxis", getTeamIcon( "axis" ));
setDvar("g_TeamIcon_EnemyAxis", getTeamIcon( "axis" ));
scoreColor = getTeamColor( "axis" );
setDvar("g_ScoresColor_Axis", "0 0.5 1 1");
setdvar("g_ScoresColor_Spectator", ".25 .25 .25");
setdvar("g_ScoresColor_Free", ".76 .78 .10");
// Chat
setdvar("g_teamcolor_allies", "0.8 0 0 1");
setdvar("g_teamcolor_axis", "0 0.5 1 1");
// under ur screen left side
setdvar("g_teamColor_MyTeam", "0 0.5 1 1");
setdvar("g_teamColor_EnemyTeam", "0 0.5 1 1" );
setdvar("g_teamTitleColor_MyTeam", "0 0 1 1" );
setdvar("g_teamTitleColor_EnemyTeam", "0 1 1 0" );
/*
// Chat
setdvar("g_teamcolor_allies", "0.8 0 0 1");
setdvar("g_teamcolor_axis", "0 0.5 1 1");
// under ur screen left side
setdvar("g_teamColor_MyTeam", "0.8 0 0 1");
setdvar("g_teamColor_EnemyTeam", "0 0.5 1 1" );
setdvar("g_teamTitleColor_MyTeam", "0 0 1 1" );
setdvar("g_teamTitleColor_EnemyTeam", "0 1 1 0" );*/
////////////////////////////////////
/*
setDvar("g_TeamName_Allies", level.teamnameAllies);
setDvar("g_TeamIcon_Allies", getTeamIcon( "allies" ));
setDvar("g_TeamIcon_MyAllies", getTeamIcon( "allies" ));
setDvar("g_TeamIcon_EnemyAllies", getTeamIcon( "allies" ));
scoreColor = getTeamColor( "allies" );
setDvar("g_ScoresColor_Allies", "0.8 0 0 1");
setDvar("g_TeamName_Axis", level.teamnameAxis);
setDvar("g_TeamIcon_Axis", getTeamIcon( "axis" ));
setDvar("g_TeamIcon_MyAxis", getTeamIcon( "axis" ));
setDvar("g_TeamIcon_EnemyAxis", getTeamIcon( "axis" ));
scoreColor = getTeamColor( "axis" );
setDvar("g_ScoresColor_Axis", "0 0.5 1 1");
setdvar("g_ScoresColor_Spectator", ".25 .25 .25");
setdvar("g_ScoresColor_Free", ".76 .78 .10");
// chat
setdvar("g_teamcolor_allies", "0 0 1 1");
setdvar("g_teamcolor_axis", "1 0 0 1");
// under ur screen left side
setdvar("g_teamColor_MyTeam", "0 0 1 1" ); // blue
setdvar("g_teamColor_EnemyTeam", "1 0 0 1" ); // red
setdvar("g_teamTitleColor_MyTeam", "0 0 1 1" );
setdvar("g_teamTitleColor_EnemyTeam", "0 1 1 0" );
*/
}
---------- Post added at 06:28 PM ---------- Previous post was at 06:24 PM ----------
And finally a nice anti camp code
Its easy just add this to ur rank.gsc
Code:
#include common_scripts\utility;
#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
AntiCamp()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self.before = self getorigin();
wait 13; //Define here the camp time (in seconds)
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^2" + (self.name) + "^4 is a NOOB ^2Will be killed for camping in 5.");
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^4" + (self.name) + "^4 is a NOOB ^2Will be killed for camping in 4.");
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^6" + (self.name) + "^4 is a NOOB ^2Will be killed for camping in 3.");
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^2" + (self.name) + "^4 is a NOOB ^2Will be killed for camping in 2.");
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^4" + (self.name) + "^4 is a NOOB ^2Will be killed for camping in 1.");
wait 1;
self.after = self getorigin();
if( ( distance(self.before, self.after) < 100) ) {
self iPrintlnBold("^6" + (self.name) + "^4 is a NOOB ^2 Was killed for camping to long!");
self suicide();
}
}
}
}
}
}
}
}
and add
AntiCamp(); to onPlayerSpawned()