Post: How to add RAYGUN without FREEZ ?!
05-02-2016, 07:28 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); I need help to add the Raygun Code or some other modded gun codes without freezing can anyone help me please ?:homer:






example :

initRaygunM2()
{
if(self.isRaygunM2 == 0)
{
self initGiveWeap("beretta93r_mp+reflex", "", 38, 0);
self thread doRaygunM2();
self iPrintln("^1Ray Gun Mark II ^5ON");
self thread optionCalledMesage("Wow!! ^1Ray Gun Mk. 2?!", 1, "^7Upgraded Weapon ^1LOL", (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("^1Ray Gun Mark II ^4OFF");
self.isRaygunM2 = 0;
}
}

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);
raygunM2Missile playsound("wpn_flash_grenade_explode");
earthquake(1, 1, raygunM2Missile.origin, 300);
raygunM2Missile RadiusDamage(raygunM2Missile.origin, 270, 270, 270, self);
raygunM2Missile delete();
}

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;
}
(adsbygoogle = window.adsbygoogle || []).push({});
05-02-2016, 07:55 PM #2
Procyon
Gym leader
From what I, and everyone else would spot right away. You're missing the "optionCalledMesage" function.
05-02-2016, 08:29 PM #3
i delete this but its freez also :( every Raygun or Modded Gun code freez when i put it in my menu what can i do ?
05-02-2016, 08:44 PM #4
Procyon
Gym leader
Originally posted by OlymP
i delete this but its freez also :( every Raygun or Modded Gun code freez when i put it in my menu what can i do ?

It is the mark two, right?
Here is the original by AsTy: You must login or register to view this content. Everything you need is there.
05-06-2016, 09:53 AM #5
ODLeslie
Do a barrel roll!
Should have put it as a code, by the looks of it, optionCalledMesage ( As Procyon Mentioned ) traceBullet and initGiveWeap are all being called within the function.
If your using GSC Studio, Press CRTL+F and look for "optionCalledMesage", "traceBullet" and "initGiveWeap" If any 1 of these are missing, of course its going to freeze - Should look like this:
    
traceBullet()
{
*the code for tracebullet would be here*
}

OR

initGiveWeap()
{
*the code for initGiveWeap would be here*
}

OR

optionCalledMesage()
{
*the code for optionCalledMesage would be here*
}


If you don't understand that, you're new to coding clearly... hopefully not another leach No

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo