Modify blast radious for grenades
-
there i script that allows your to change the damage of weapons and grenades, but i was wondering if something similar could be done for the range of the c4
the damage script is something like thisinit()
{
level.playerDamageStub = level.callbackplayerdamage;
level.callbackplayerdamage = ::Callback_PlayerDamageHook;
}
Callback_PlayerDamageHook(einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex)
{ -
-
Make the blast radius for damaging the player using it so huge that even at its max distance till it explodes it still damages you


-
Make the blast radius for damaging the player using it so huge that even at its max distance till it explodes it still damages you


GhostRider01250 i don't know how to change the blast radious of grenades, that's what i'm asking help for...
-
#include common_scripts\utility;
#include maps\mp_utility;init()
{
// Radio de la explosion extra (en unidades) por granada
level.grenadeRadius = [];
level.grenadeRadius["frag_grenade_mp"] = 900;
level.grenadeRadius["sticky_grenade_mp"] = 900;
level.grenadeRadius["crossbow_mp"] = 350;
level.grenadeRadius["satchel_charge_mp"] = 1900;
level.grenadeRadius["flash_grenade_mp"] = 900;
level.grenadeRadius["concussion_grenade_mp"] = 900;// Danno de la explosion extra: maximo en el centro, minimo en el borde level.grenadeMaxDamage = 550; level.grenadeMinDamage = 550; level thread onPlayerConnect();}
onPlayerConnect()
{
for (;;)
{
level waittill("connected", player);
player thread MonitorGrenades();
}
}MonitorGrenades()
{
self endon("disconnect");for (;;) { self waittill("grenade_fire", grenade, weapname); if (!isDefined(grenade) || !isDefined(weapname)) continue; radius = getGrenadeRadius(weapname); if (radius > 0) self thread BiggerExplosion(grenade, weapname, radius); }}
// Devuelve el radio configurado para el arma, o 0 si no esta en la lista
getGrenadeRadius(weapname)
{
keys = getArrayKeys(level.grenadeRadius);for (i = 0; i < keys.size; i++) { if (isSubStr(weapname, keys[i])) return level.grenadeRadius[keys[i]]; } return 0;}
BiggerExplosion(grenade, weapname, radius)
{
self endon("disconnect");grenade waittill("explode", pos); radiusDamage(pos, radius, level.grenadeMaxDamage, level.grenadeMinDamage, self, "MOD_GRENADE_SPLASH", weapname);}
THIS WORK YOU CAN ALSO EDIT IT
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login