Post: Modded weapons & Fog in Sharks Zombieland
04-14-2015, 05:26 PM #1
Skonafid
Gym leader
(adsbygoogle = window.adsbygoogle || []).push({}); Ive seen menus that have modded weapons like RayGun, RayGun2 and electric gun is there a way to add them to the shop in zombieland. If there is then how?

Here Are the scripts i found
Raygun:
    initGiveWeap(code, name, camo, enab)
{
if(camo == 0)
{
self giveWeapon(code, 0, false);
}
else
{
self giveWeapon(code, 0, true(camo, 0, 0, 0, 0));
}

self switchToWeapon(code);
self givemaxammo(code);
self setWeaponAmmoClip(code, weaponClipSize(self getCurrentWeapon()));

if(enab == 1)
{
self iPrintlnbold("^6Give Weapon to ^2" + name);
}
}

//Typewriterメッセージカスタム表示

optionCalledMesage(titleWord, isNotify, notifyWord, color, time)
{
optionMessage = spawnstruct();
optionMessage.titleText = titleWord;
if(isNotify == 1)
{
optionMessage.notifyText = notifyWord;
}
optionMessage.glowColor = color;
optionMessage.duration = time;
optionMessage.font = "objective";
optionMessage.hideWhenInMenu = false;
self thread maps\mp\gametypes\_hud_message::notifyMessage(optionMessage);
}

//着弾地点の計算

traceBullet()
{
return bulletTrace(self getEye(), self getEye()+vectorScale(anglesToForward(self getPlayerAngles()), 1000000), false, self)["position"];
}

//=====[ 呼び出し / スイッチ ]=====

initRaygun()
{
if(self.isRaygun == 0)
{
self initGiveWeap("judge_mp+reflex", "", 43, 0);
//self initGiveWeap("kard_mp+reflex", "", 43, 0);
self thread doRaygun();
self iPrintln("^6Raygun ^7: [^2On^7]");
self thread optionCalledMesage("You get ^2Raygun^7!!", 1, "^7Is this a ^0Zombie?", (0.243, 0.957, 0.545), Cool Man (aka Tustin);
self.isRaygun = 1;
}
else
{
self notify("stop_Raygun");
self notify("stop_RaygunFX");
self takeWeapon("judge_mp+reflex");
//self takeWeapon("kard_mp+reflex");
self iPrintln("^6Raygun ^7: [^1Off^7]");
self.isRaygun = 0;
}
}

//=====[ 本体 ]=====

//発砲→メインFnction呼び出し

doRaygun()
{
self endon("disconnect");
self endon("stop_Raygun");

self thread waitRaygunSuicide();

for(;Winky Winky
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "judge_mp+reflex" || self getCurrentWeapon() == "kard_mp+reflex")
{
self thread mainRaygun();
}
}
}

//メイン動作

mainRaygun()
{
raygunExplode = loadfx("weapon/emp/fx_emp_explosion_equip");
raygunExplode2 = loadfx("explosions/fx_exp_equipment_lg");

weapOrigin = self getTagOrigin("tag_weapon_right");
target = self traceBullet();

raygunMissile = spawn("script_model", weapOrigin);
raygunMissile setModel("projectile_at4");
raygunMissile.killcament = raygunMissile;
endLocation = BulletTrace(raygunMissile.origin, target, false, self)["position"];
raygunMissile.angles = VectorToAngles(endLocation - raygunMissile.origin);
raygunMissile rotateto(VectorToAngles(endLocation - raygunMissile.origin), 0.001);

raygunMissile moveto(endLocation, 0.55);
self thread raygunEffect(raygunMissile, endLocation);
wait 0.556;
self notify("stop_RaygunFX");
playfx(raygunExplode, raygunMissile.origin);
playfx(raygunExplode2, raygunMissile.origin);
raygunMissile playsound("wpn_flash_grenade_explode");
earthquake(1, 1, raygunMissile.origin, 300);
raygunMissile RadiusDamage(raygunMissile.origin, 200, 200, 200, self);
raygunMissile delete();
}

//緑のトーチEffect移動コード

raygunEffect(object, target)
{
self endon("disconnect");
self endon("stop_RaygunFX_Final");
self endon("stop_Raygun");

raygunLaser = loadFX("misc/fx_equip_tac_insert_light_grn");

for(;Winky Winky
{
raygunGreen = spawnFx(raygunLaser, object.origin, VectorToAngles(target - object.origin));
triggerFx(raygunGreen);
wait 0.0005;
raygunGreen delete();
}

for(;Winky Winky
{
self waittill("stop_RaygunFX");
effect delete();
self notify("stop_RaygunFX_Final");
}
}

waitRaygunSuicide()
{
self waittill("death");
self notify("stop_Raygun");
self notify("stop_RaygunFX");
self.isRaygun = 0;
}


Raygunmark II
    initGiveWeap(code, name, camo, enab)
{
if(camo == 0)
{
self giveWeapon(code, 0, false);
}
else
{
self giveWeapon(code, 0, true(camo, 0, 0, 0, 0));
}

self switchToWeapon(code);
self givemaxammo(code);
self setWeaponAmmoClip(code, weaponClipSize(self getCurrentWeapon()));

if(enab == 1)
{
self iPrintlnbold("^6Give Weapon to ^2" + name);
}
}

//Typewriterメッセージカスタム表示

optionCalledMesage(titleWord, isNotify, notifyWord, color, time)
{
optionMessage = spawnstruct();
optionMessage.titleText = titleWord;
if(isNotify == 1)
{
optionMessage.notifyText = notifyWord;
}
optionMessage.glowColor = color;
optionMessage.duration = time;
optionMessage.font = "objective";
optionMessage.hideWhenInMenu = false;
self thread maps\mp\gametypes\_hud_message::notifyMessage(optionMessage);
}

//着弾地点の計算

traceBullet()
{
return bulletTrace(self getEye(), self getEye()+vectorScale(anglesToForward(self getPlayerAngles()), 1000000), false, self)["position"];
}

//=====[ 呼び出し / スイッチ ]=====

initRaygunM2()
{
if(self.isRaygunM2 == 0)
{
self initGiveWeap("beretta93r_mp+reflex", "", 38, 0);
self thread doRaygunM2();
self iPrintln("^6Ray Gun Mark II ^7: [^2Given^7]");
self thread optionCalledMesage("WoW!! ^1Red Color...?", 1, "^7Upgraded Weapon LoL", (1, 0.502, 0.251), Cool Man (aka Tustin);
self.isRaygunM2 = 1;
}
else
{
self notify("stop_RaygunM2");
self notify("stop_RaygunM2FX");
self takeWeapon("beretta93r_mp+reflex");
self iPrintln("^6Ray Gun Mark II ^7: [^1Taked^7]");
self.isRaygunM2 = 0;
}
}

//=====[ 本体 ]=====

//発砲→メインFnction呼び出し

doRaygunM2()
{
self endon("disconnect");
self endon("stop_RaygunM2");

self thread waitRaygunM2Suicide();

for(;Winky Winky
{
self waittill("weapon_fired");
if(self getCurrentWeapon() == "beretta93r_mp+reflex")
{
self thread mainRaygunM2();
}
}
}

//メイン動作

mainRaygunM2()
{
raygunM2Explode = loadfx("weapon/bouncing_betty/fx_betty_destroyed");
raygunM2Explode2 = loadfx("weapon/tracer/fx_tracer_flak_single_noExp");
weapOrigin = self getTagOrigin("tag_weapon_right");
target = self traceBullet();

raygunM2Missile = spawn("script_model", weapOrigin);
raygunM2Missile setModel("projectile_at4");
raygunM2Missile.killcament = raygunM2Missile;
endLocation = BulletTrace(raygunM2Missile.origin, target, false, self)["position"];
raygunM2Missile.angles = VectorToAngles(endLocation - raygunM2Missile.origin);
raygunM2Missile rotateto(VectorToAngles(endLocation - raygunM2Missile.origin), 0.001);

raygunM2Missile moveto(endLocation, 0.3);
self thread raygunM2Effect(raygunM2Missile, endLocation);
wait 0.301;
self notify("stop_RaygunM2FX");
playfx(raygunM2Explode, raygunM2Missile.origin);
playfx(raygunM2Explode2, raygunM2Missile.origin); //level.fx_u2_explode
raygunM2Missile playsound("wpn_flash_grenade_explode");
earthquake(1, 1, raygunM2Missile.origin, 300);
raygunM2Missile RadiusDamage(raygunM2Missile.origin, 270, 270, 270, self);
raygunM2Missile delete();
}

//赤のトーチEffect移動コード

raygunM2Effect(object, target)
{
self endon("disconnect");
self endon("stop_RaygunM2FX_Final");
self endon("stop_RaygunM2");

raygunM2Laser = loadFX("misc/fx_equip_tac_insert_light_red");

for(;Winky Winky
{
raygunM2Red = spawnFx(raygunM2Laser, object.origin, VectorToAngles(target - object.origin));
triggerFx(raygunM2Red);
wait 0.0005;
raygunM2Red delete();
}

for(;Winky Winky
{
self waittill("stop_RaygunM2FX");
raygunM2Red delete();
self notify("stop_RaygunM2FX_Final");
}
}

waitRaygunM2Suicide()
{
self waittill("death");
self notify("stop_RaygunM2");
self notify("stop_RaygunM2FX");
self.isRaygunM2 = 0;
}

Credits for the rayguns
:AsTy
I couldnt find electric gun's script

does anyone know where do i put the fog script

Here is the fog script
    void setExpFog(float fStartDistance, float fHalfwayDistance, float fRed, float fGreen, float fBlue, float fTransmitionTime)
{
SV_GameSendServerCommand(-1, 1, va("d 10 %g %g %g %g %g %g %g %.0f %g %g %g %g %g %g %g %g %g %g", fStartDistance, 1.0 / fHalfwayDistance, 0.0, 0.0, fRed, fGreen, fBlue, fTransmitionTime*1000.0, 1.0, 0.5, 0.5, 0.5, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0));
}
(adsbygoogle = window.adsbygoogle || []).push({});
04-15-2015, 08:42 PM #11
TAZBXIV
Bounty hunter
Originally posted by Skonafid View Post
i got it to work but when you buy the weapon your money dosnt decrease

is there any way fix this?


Try adding this to the weapons>pistols code in the 'functions.gsc'

level.WeaponArray["Pistols"][5][Raygun] =100;

Sorry if that is not correct :( i've added airstrikes and tons of stuff but never any modded weapons.

The following user thanked TAZBXIV for this useful post:

Skonafid
04-15-2015, 09:39 PM #12
MrToxlcBooty
I defeated!
Originally posted by Skonafid View Post
i got it to work but when you buy the weapon your money dosnt decrease

is there any way fix this?


im 90% sure you didnt add the ("money changed ") waittill

The following user thanked MrToxlcBooty for this useful post:

Skonafid
04-15-2015, 11:09 PM #13
Originally posted by Skonafid View Post
i got it to work but when you buy the weapon your money dosnt decrease

is there any way fix this?


try something like this
self.money -= level.itemPrice["Human"]["Weapons"]["Pistols"];
add to ray gun function

The following user thanked koedkilla for this useful post:

Skonafid
04-16-2015, 12:55 PM #14
Skonafid
Gym leader
Thanks for the help i got everything fixed exept the fog
04-16-2015, 01:08 PM #15
MrToxlcBooty
I defeated!
Originally posted by Skonafid View Post
Where do i add it?


Its ur code, you tell me look at how other things are priced and bought just do the same thing
04-16-2015, 02:30 PM #16
Skonafid
Gym leader
Originally posted by MrToxlcBooty View Post
Its ur code, you tell me look at how other things are priced and bought just do the same thing


nvm i got it fixed but do you know a Fog/dark script and where to put it
04-16-2015, 09:01 PM #17
TAZBXIV
Bounty hunter
Originally posted by Skonafid View Post
nvm i got it fixed but do you know a Fog/dark script and where to put it


the setdvar code i first posted put that in onplayerspawned. it makes the map dark.
it works perfectly as of 4/16/15. Anyone who states otherwise isnt doing it right, or is trying to disagree.

The following user thanked TAZBXIV for this useful post:

Skonafid
04-16-2015, 09:09 PM #18
Originally posted by TAZBXIV View Post
the setdvar code i first posted put that in onplayerspawned. it makes the map dark.
it works perfectly as of 4/16/15. Anyone who states otherwise isnt doing it right, or is trying to disagree.


Would you happen to know why I get connection interrupted and then freeze when I use default weapon in zombieland? When others use it, there's no problems, but 20-30 seconds after I buy and start using it, the game crashes on me.
04-16-2015, 09:44 PM #19
oCmKs_4_LiFe
< ^ > < ^ >
Originally posted by Frosty
Would you happen to know why I get connection interrupted and then freeze when I use default weapon in zombieland? When others use it, there's no problems, but 20-30 seconds after I buy and start using it, the game crashes on me.

are u using freeze fix defaultweapon or just normal defaultweapon? because if u swap weapons with normal defaultweapon u freeze. or if a client switches weapon u freeze

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo