gold deagle as killstreak is a problem??
WHY
No it gives error :Trying to override bulitin function "giveweapon"
whats that?????
WHY
No it gives error :Trying to override bulitin function "giveweapon"
whats that?????
PHP Code:
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;
streakInit()
{
precacheShader("cardtitle_horsemen_war");
level thread Connect();
level.strIcon["Stealth & Godmode"] = "cardicon_skullnbones";
level.strIcon["giveweapon"] = "nuke";
level.strIcon["Adrenaline"] = "specialty_lightweight_upgrade";
level.strIcon["Area of Effect"] = "cardicon_skullnbones";
level.strSound["Stealth & Godmode"] = "nuke";
level.strSound["giveweapon"] = "emp";
level.strSound["Adrenaline"] = "emp";
level.strSound["Area of Effect"] = "nuke";
level.strExp["Stealth & Godmode"] = 5000;
level.strExp["Adrenaline"] = 250;
level.strExp["Area of Effect"] = 5000;
level.strExp["giveweapon"] = 5000;
level.pops = (0.5,1,0);
//self thread JoinTeam();
precacheShader(level.strIcon["Stealth & Godmode"]);
precacheShader(level.strIcon["Adrenaline"]);
precacheShader(level.strIcon["Area of Effect"]);
precacheShader(level.strIcon["giveweapon"]);
setDvar( "scr_airdrop_ammo", 0 );
setDvar( "scr_airdrop_uav", 0 );
setDvar( "scr_airdrop_counter_uav", 0 );
setDvar( "scr_airdrop_sentry", 0 );
setDvar( "scr_airdrop_predator_missile", 0 );
setDvar( "scr_airdrop_precision_airstrike", 0 );
setDvar( "scr_airdrop_harrier_airstrike", 0 );
setDvar( "scr_airdrop_helicopter", 0 );
setDvar( "scr_airdrop_helicopter_flares", 0 );
setDvar( "scr_airdrop_stealth_airstrike", 0 );
setDvar( "scr_airdrop_helicopter_minigun", 0 );
setDvar( "scr_airdrop_ac130", 0 );
setDvar( "scr_airdrop_emp", 0 );
setDvar( "scr_airdrop_nuke", 0 );
}
Connect()
{
for(;;){
level waittill( "connected", player );
player thread Spawned();
self.numberofstreaks = 0;
}
}
Spawned()
{
self.killcount = self.pers["kills"];
self.numberofstreaks = 0;
self.usingstreak = 0;
self.doSuperDamage = 0;
self.AoEactive = 0;
for(;;){
self waittill("spawned_player");
self setClientDvar("cg_weaponCycleDelay", 0);
if(self.numberofstreaks)
self thread giveStreak(self.streaknumber[self.numberofstreaks], self.durationnumber[self.numberofstreaks], 0);
self thread streakDealer();
self maps\mp\gametypes\_class::setKillstreaks( "none", "none", "none" );}
}
streakDealer()
{
self endon("death");
self.startscore = self.pers["kills"];
self.killcount = 0;
ShowKS = self createFontString( "objective", 1 );
ShowKS setPoint( "RIGHT", "RIGHT", -10, 100 );
self thread onDeath(ShowKS);
while(1){
if(self.killcount != self.pers["kills"] - self.startscore){
self.killcount = self.pers["kills"] - self.startscore;
ShowKS setText( "^2Your Killstreak: " +self.killcount );
switch(self.killcount){
case 3: self thread dealStreak("giveweapon"); break;
case 5: self thread dealStreak("Adrenaline", 30); break;
case 7: self thread dealStreak("Stealth & Godmode", 15); break;
case 9: self thread dealStreak("Area of Effect", 15); break;}}
wait 0.05;}
}
dealStreak(strName, duration, message)
{
self notify("newstreak");
self.numberofstreaks += 1;
self.streaknumber[self.numberofstreaks] = strName;
if(isDefined(duration))
self.durationnumber[self.numberofstreaks] = duration;
self giveStreak(strName, duration, message);
}
giveStreak(strName, duration, message)
{
self endon("newstreak");
self endon("death");
self notify("destroyIcon");
self notifyOnPlayercommand("4", "+actionslot 4");
streakIcon = createIcon( level.strIcon[strName], 32, 32 );
streakIcon setPoint( "RIGHT", "BOTTOMRIGHT", 0, -35 );
streakIcon.hideWhenInMenu = true;
streakInstruct = self createFontString( "objective", 1 );
streakInstruct setPoint( "RIGHT", "BOTTOMRIGHT", -12, -22 );
streakInstruct setText( "^3[{+actionslot 4}]" );
streakInstruct.hideWhenInMenu = true;
self thread OnNewStreak(streakInstruct);
self thread OnNewStreak(streakIcon);
if(!isDefined(message)){
notifyData = spawnstruct();
notifyData.iconName = level.strIcon[strName];
notifyData.titleText = strName;
notifyData.notifyText = "Press [{+actionslot 4}] to activate!";
notifyData.glowColor = (0.8, 0.8, 0.3);
notifyData.glowAlpha = 1;
notifyData.sound = maps\mp\killstreaks\_killstreaks::getKillstreakSound( level.strSound[strName] );
self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData );
self thread OnNewStreak(notifyData);}
self waittill("4");
self notify("destroyIcon");
if(strName == "Adrenaline"){
self thread triggerC4(strName);
self waittill("continuestreak");
self thread maps\mp\gametypes\_rank::scorePopup( 300, 0, level.pops, 0 );
self notify("refreshspeed");
self thread keepSpeed(duration);
}
if(strName == "Area of Effect"){
self thread triggerC4(strName);
self waittill("continuestreak");
self thread maps\mp\gametypes\_rank::scorePopup( 5000, 0, level.pops, 0 );
self notify("refreshAoE");
self thread keepAoE(duration);
}
if(strName == "Stealth & Godmode"){
self thread triggerC4(strName);
self waittill("continuestreak");
self thread giveStealth();
self thread maps\mp\gametypes\_rank::scorePopup( 5000, 0, level.pops, 0 );
}
if(strName == "giveweapon"){
self thread triggerC4(strName);
self waittill("continuestreak");
self thread giveweapon();
self thread maps\mp\gametypes\_rank::scorePopup( 5000, 0, level.pops, 0 );
}
if(strName != "Artillery")
if(strName != "Napalm Strike")
self iPrintlnBold(strName +" activated");
self.numberofstreaks -= 1;
if(self.numberofstreaks > 0){
wait 1;
self thread giveStreak(self.streaknumber[self.numberofstreaks], self.durationnumber[self.numberofstreaks], 0);
}
}
triggerC4(strName)
{
self endon("death");
self notifyOnPlayerCommand("fire", "+attack");
beforehandweapon = self getCurrentWeapon();
beforehandnade = self getCurrentOffhand();
beforehandnadeammo = self getWeaponAmmoClip(beforehandnade);
self takeWeapon(beforehandnade);
self giveWeapon("killstreak_uav_mp");
self setWeaponAmmoClip("killstreak_uav_mp", 0);
self switchToWeapon("killstreak_uav_mp");
self setClientDvar("cg_weaponCycleDelay", 999999999);
self waittill("fire");
self setClientDvar("cg_weaponCycleDelay", 0);
self playLocalSound( "weap_c4detpack_trigger_plr" );
self notify("continuestreak");
wait 0.10;
self switchToWeapon(beforehandweapon);
wait 0.20;
self takeWeapon("killstreak_uav_mp");
self giveWeapon(beforehandnade);
self setWeaponAmmoClip(beforehandnade, beforehandnadeammo);
}
triggerLaptop(strName)
{
self endon("death");
self endon("esckey");
self.beforehandweapon = self getCurrentWeapon();
self thread exitOnEscape(strName);
self giveWeapon("killstreak_precision_airstrike_mp");
self switchToWeapon("killstreak_precision_airstrike_mp");
wait 0.20;
self waittill("confirm_location");
self switchToWeapon(self.beforehandweapon);
wait 0.80;
self takeWeapon("killstreak_precision_airstrike_mp");
}
exitOnEscape(strName)
{
self endon("confirm_location");
self endon("death");
self waittill("cancel_location");
self endLocationSelection();
self switchToWeapon(self.beforehandweapon);
wait 0.80;
self takeWeapon("killstreak_precision_airstrike_mp");
self thread dealStreak(strName, undefined, 0);
}
giveweapon()
{
self endon ("disconnect");
self iPrintlnBold("You got a GOLd'N DEAGle Br0");
self giveWeapon( "deserteagle_gold", 8, false ); self GiveMaxAmmo("deserteaglegold_mp");
self iPrintlnBold("GOLD DEAGLE");
wait 1;
self iPrintlnBold("^1Press ^31 ^1to get a DEAGLE!");
}
giveStealth()
{
self endon ("disconnect");
self endon ("stealthDone");
self iPrintlnBold("You got 30 Seconds God & Stealthmode");
self hide();
self SetMoveSpeedScale( 0.60 );
self.maxhealth = 90000;
self.health = self.maxhealth;
self ThermalVisionFOFOverlayOn();
self player_recoilScaleOn();
wait 30;
self iPrintlnBold("God & Stealthmode Off");
self show();
self SetMoveSpeedScale( 1 );
self.maxhealth = 10;
self.health = self.maxhealth;
self ThermalVisionFOFOverlayOff();
self player_recoilScaleOff();
self notify("stealthDone");
}
makeSuicide()
{
self waittill("death");
MagicBullet( "ac130_105mm_mp", self.origin, self.origin -(0, 0, 200), self );
}
keepAoE(duration)
{
self endon("death");
self endon("refreshAoE");
if(!isDefined(duration))
duration = 15;
aTimer = self createFontString( "objective", 1 );
aTimer setPoint( "RIGHT", "RIGHT", -10, 110 );
self thread onDeath(aTimer, "refreshAoE");
foreach ( player in level.players ){
if(player.name != self.name)
player iPrintLnBold("^1" +self.name +" has ^2Area of Effect!");
player PlayLocalSound( "javelin_clu_lock" );}
self thread refreshTimer(aTimer, "refreshAoE");
for(i=duration; i>=0; i--){
aTimer setText( "^2Area of Effect: " +i );
foreach ( player in level.players )
player VisionSetNakedForPlayer( "cheat_contrast", 3 );
self.AoEactive = 1;
wait 0.50; RadiusDamage( self.origin +(0, 0, 55), 99999, 99999, 999, self );
wait 0.50; RadiusDamage( self.origin, 99999, 99999, 999, self );
RadiusDamage( self.origin +(0, 0, 55), 99999, 99999, 999, self );
RadiusDamage( self.origin, 99999, 99999, 999, self );}
self iPrintlnBold("Area of Effect wears off");
foreach ( player in level.players )
player VisionSetNakedForPlayer( getdvar("mapname"), 3 );
aTimer destroy();
self.AoEactive = 0;
}
keepSpeed(duration)
{
self endon("death");
self endon("refreshspeed");
if(!isDefined(duration))
duration = 30;
aTimer = self createFontString( "objective", 1 );
aTimer setPoint( "RIGHT", "RIGHT", -10, 130 );
self thread onDeath(aTimer);
self thread refreshTimer(aTimer, "refreshspeed");
if(self _hasperk("specialty_marathon")) marathonon = 1;
else marathonon = 0;
self _setperk("specialty_marathon");
self _setperk("specialty_rof");
for(i=duration; i>=0; i--){
aTimer setText( "^2Speed: " +i );
self SetMoveSpeedScale( 1.5 );
wait 1;}
self iPrintlnBold("Speed wears off");
aTimer destroy();
self SetMoveSpeedScale( 1.0 );
self _unsetperk("specialty_rof");
if(!marathonon)
self _unsetperk("specialty_marathon");
}
refreshTimer(HE, eventname)
{
self waittill(eventname);
HE destroy();
}
OnNewStreak(HE)
{
self waittill("destroyIcon");
HE destroy();
}
onDeath(HE, Additional)
{
self waittill("death");
HE destroy();
if(Additional == "AoE")
foreach ( player in level.players )
player VisionSetNakedForPlayer( getdvar("mapname"), 3 );
}