si se que esta verga esta en el foro de AM-EN pero no sé si sirva esa nunca la probé xddx, esta si..
muyyyyy buena amigos de yutub hoy les traigo un tutorial de como hacer niveles a no va era una bomba aniquiladora para ct v: o zm
-Primero
-Segundo
-Tercero
-Cuarto
-Quinto
-Sexto
cualquier error me dicen o duda así la reparo o lo que sea xd
Cuando encuentré mis otras bombas las subiré si no me han baneado por postear mierda jaja.
sirve para cualquier mod si no compila avisen quite unas cosas que el zp creo que ya trae!
edit, a la verga busquen los mdls & sounds son bien shidoris sacan soniditos & esas mierdas v:
edit2, mierda así se da una granada antes de que pregunten ..
muyyyyy buena amigos de yutub hoy les traigo un tutorial de como hacer niveles a no va era una bomba aniquiladora para ct v: o zm
-Primero
buscamos esta verga con control + f si no saben aun de su existencia v:
& abajo agregamos
o en tal caso que tenga otra granada agregan el numero que va.
Código PHP:
const NADE_TYPE_FLARE = 4444
Código PHP:
const NADE_TYPE_KILLBOMB = 5555
-Segundo
Creamos constantes & variables que registraran sonidos, models etc.
esto pueden ponerlo abajo de los includes si quieren
esto pueden ponerlo abajo de los includes si quieren
Código PHP:
new const MODEL_P[] = "models/zombie_plague/p_zombibomb.mdl";
new const MODEL_V[] = "models/zombie_plague/v_zombibomb.mdl";
new const MODEL_W[] = "models/zombie_plague/w_zombibomb.mdl";
new const SOUND_BUY[] = "zombie_plague/killbomb_buy.wav";
new const SOUND_EXPLODE[] = "zombie_plague/killbomb_exp.wav";
new szTrail, szExplode, szBonusHp;
new szKillbomb[ 33 ];
-Tercero
le asignamos valor a las variables que creamos antes.
nos vamos a
& dentro de las llaves donde sientan más como agregan esto.
& precacheamos dichos archivos que usaremos en esta bomba
para eso nos vamos a
siempre dentro de la misma donde sientan más como agregan
nos vamos a
Código PHP:
public plugin_init()
Código PHP:
szBonusHp = register_cvar("bb_killbomb_hp","100")
para eso nos vamos a
Código PHP:
public plugin_precache()
Código PHP:
szTrail = precache_model("sprites/laserbeam.spr");
szExplode = precache_model("sprites/skull.spr");
precache_model(MODEL_P);
precache_model(MODEL_V);
precache_model(MODEL_W);
precache_sound(SOUND_BUY);
precache_sound(SOUND_EXPLODE);
Al final de todo code agregamos esto:
si quieren que la granada sea para zm quitenle el ! del if dentro del bucle while
Código PHP:
KillBombExplode(ent)
{
static Float:originF[3]
pev(ent, pev_origin, originF)
engfunc(EngFunc_MessageBegin, MSG_PAS, SVC_TEMPENTITY, originF, 0)
write_byte(TE_EXPLOSION)
engfunc(EngFunc_WriteCoord, originF[0])
engfunc(EngFunc_WriteCoord, originF[1])
engfunc(EngFunc_WriteCoord, originF[2])
write_short(szExplode)
write_byte(40)
write_byte(30)
write_byte(14)
message_end()
emit_sound(ent, CHAN_WEAPON, SOUND_EXPLODE, 1.0, ATTN_NORM, 0, PITCH_NORM)
static attacker; attacker = pev(ent, pev_owner);
if(!is_user_connected(attacker))
{
engfunc(EngFunc_RemoveEntity, ent)
return;
}
static victim; victim = -1;
while((victim = engfunc(EngFunc_FindEntityInSphere, victim, originF, 240.0)) != 0)
{
if(!is_user_alive( victim ) || !g_zombie[ victim ] ) continue;
ExecuteHam(Ham_TakeDamage, victim, ent, attacker, 10000.0, DMG_BULLET)
set_user_health( attacker, get_user_health( attacker ) + get_pcvar_num(szBonusHp))
}
engfunc(EngFunc_RemoveEntity, ent )
}
-Quinto
Buscamos lo siguiente.
bueno dentro de eso verán algo como esto:
yo la pondré en la bomba frost
& le agregamos esto:
& gusto en esa misma condición de la bomba frost al final agregan una llave más
quedaria así
luego vamos a
public fw_ThinkGrenade(entity)
& agregamos esto dentro del switch
Código PHP:
public fw_SetModel(entity, const model[])
Código PHP:
else if(model[9] == 'f' && model[10] == 'l' && get_pcvar_num(cvar_frostgrenades))
& le agregamos esto:
Código PHP:
if(szKillbomb[pev(entity, pev_owner)])
{
--szKillbomb[pev(entity, pev_owner)];
set_pev(entity, pev_flTimeStepSound, NADE_TYPE_KILLBOMB)
set_rendering(entity, kRenderFxGlowShell, 237, 60, 202, kRenderNormal, 0)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(entity)
write_short(szTrail)
write_byte(10)
write_byte(3)
write_byte(237)
write_byte(60)
write_byte(202)
write_byte(192)
message_end()
engfunc(EngFunc_SetModel, entity, MODEL_W)
}else {
& gusto en esa misma condición de la bomba frost al final agregan una llave más
quedaria así
Código PHP:
else if(model[9] == 'f' && model[10] == 'l' && get_pcvar_num(cvar_frostgrenades)) // Frost Grenade
{
if(szKillbomb[pev(entity, pev_owner)])
{
--szKillbomb[pev(entity, pev_owner)];
set_pev(entity, pev_flTimeStepSound, NADE_TYPE_KILLBOMB)
set_rendering(entity, kRenderFxGlowShell, 237, 60, 202, kRenderNormal, 0)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(entity)
write_short(szTrail)
write_byte(10)
write_byte(3)
write_byte(237)
write_byte(60)
write_byte(202)
write_byte(192)
message_end()
engfunc(EngFunc_SetModel, entity, MODEL_W)
}
else {
// Give it a glow
set_rendering(entity, kRenderFxGlowShell, 0, 100, 200, kRenderNormal, 16);
// And a colored trail
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // TE id
write_short(entity) // entity
write_short(g_trailSpr) // sprite
write_byte(10) // life
write_byte(10) // width
write_byte(0) // r
write_byte(100) // g
write_byte(200) // b
write_byte(200) // brightness
message_end()
// Set grenade type on the thrown grenade entity
set_pev(entity, PEV_NADE_TYPE, NADE_TYPE_FROST)
} // acá agregamos una llave para que no nos de 32222 errores & compile
}
luego vamos a
public fw_ThinkGrenade(entity)
& agregamos esto dentro del switch
Código PHP:
case NADE_TYPE_KILLBOMB:{
KillBombExplode(entity)
return HAM_SUPERCEDE;
}
-Sexto
vamos a replace_weapon_models(id, weaponid)
buscan el case de la bomba frost que es la flash
& lo dejan así
buscan el case de la bomba frost que es la flash
& lo dejan así
Código PHP:
case CSW_FLASHBANG: // Frost grenade
{
if(szKillbomb[ id ]){
set_pev( id , pev_viewmodel2 , MODEL_V)
set_pev( id , pev_weaponmodel2 , MODEL_P)
} else
set_pev(id, pev_viewmodel2, model_grenade_frost)
}
cualquier error me dicen o duda así la reparo o lo que sea xd
Cuando encuentré mis otras bombas las subiré si no me han baneado por postear mierda jaja.
sirve para cualquier mod si no compila avisen quite unas cosas que el zp creo que ya trae!
edit, a la verga busquen los mdls & sounds son bien shidoris sacan soniditos & esas mierdas v:
edit2, mierda así se da una granada antes de que pregunten ..
Código PHP:
++szKillbomb[ Index ];
give_item( Index, "weapon_flashbang");
emit_sound( Index, CHAN_VOICE, SOUND_BUY, 1.0, ATTN_NORM, 0, PITCH_NORM);