Raised This Month: $51 Target: $400
 12% 

[ZP] Velocidad de zombies


  
 
 
Thread Tools Display Modes
Author Message
Xen0n
BANNED
Join Date: Nov 2011
Old 01-30-2012 , 12:34   [ZP] Velocidad de zombies
#1

en mi servidor al usar un zombie al que le puse previamente 500 de velocidad (exagerando) no corre nada mas solo lo normal y mi servidor ya tiene activado sv_maxspeed 9999

me podrian ayudar a solucionarlo? si necesitan datos pidanme lo que quieran
Xen0n is offline
Xen0n
BANNED
Join Date: Nov 2011
Old 01-30-2012 , 13:08   Re: [ZP] Velocidad de zombies
#2

ya encontre que plugin proboca el error pero no se pork me podrian ayudar? plzzz les muestro la sma espero que me puedan ayudar

PD: es el plugin de galil de hielo de esta url: http://forums.alliedmods.net/showthread.php?t=148277
PD2: este plugin lo vi en otros servidores y si les funcionaba bien :S aber si ustedes ven el fallo...

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague> 
#include <fakemeta>
#include <cstrike>
#include <engine>
#include <fun>

//___________/ Values \___________________________________________________________________________________________
//**************************************************************************************************************************/
new gc_itemID
new bool:g_NitrogenGalil[33]
new 
g_Weapon[33
new 
g_FrozeN[33]
new 
NitrogenGalilSpr
new g_msgScreenFade
new g_iMaxPlayers
new g_HudSync
new FrostTime 
new BackSpeed1
new BackSpeed2

const UNIT_SECOND = (1<<12

//___________/ INIT \___________________________________________________________________________________________
//**************************************************************************************************************************/
public plugin_init()
{
    
register_plugin("[ZP] Extra Item: Nitrogen Galil""2.03""None")
    
    
// Cvars
    
FrostTime register_cvar("zp_ng_frost_time""3.5"// Time to Remove the Frost Effect
    
BackSpeed1 register_cvar("zp_ng_back_spd_h""240.0"// The Speed that Victim Recieve when is Human and g_FrozeN is false
    
BackSpeed2 register_cvar("zp_ng_back_spd_z""230.0"// The Speed that Victim Recieve when is Zombie and g_FrozeN is false
    
    // Message IDS
    
g_HudSync CreateHudSyncObj()
    
g_iMaxPlayers get_maxplayers()
    
g_msgScreenFade get_user_msgid("ScreenFade")
    
    
// ITEM NAME & COST
    
gc_itemID zp_register_extra_item("Nitrogen Galil"40ZP_TEAM_HUMAN)
    
    
// Events
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_event("CurWeapon""event_CurWeapon""b""1=1"
    
    
// Forwards
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
    
    
// Hams
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
// Lang
    
register_dictionary("nitrogen_galil.txt")
    
}

//___________/ PRECACHE \___________________________________________________________________________________________
//**************************************************************************************************************************/
public plugin_precache() 
{
    
// Models
    
precache_model("models/zombie_plague/v_nitrogen_galil.mdl"); 
    
    
// Sounds
    
precache_sound("warcraft3/impalehit.wav");
    
    
// Sprites
    
NitrogenGalilSpr precache_model("sprites/shockwave.spr");
}

//___________/ Client PutinServer & Disconnect\___________________________________________________________________________________________
//**************************************************************************************************************************/
public client_putinserver(id)
{
    
g_NitrogenGalil[id] = false
    g_FrozeN
[id] = false 
}

public 
client_disconnect(id)
{
    
g_NitrogenGalil[id] = false
    g_FrozeN
[id] = false
}

//___________/ ZP EXTRA ITEM SELECTED \___________________________________________________________________________________________
//**************************************************************************************************************************/
public zp_extra_item_selected(playeritemid)
{
    
// check if the selected item matches any of our registered ones
    
if (itemid == gc_itemID
    {
        
client_print(playerprint_chat"%L"LANG_PLAYER"PURCHASE_NG"
        
        
g_NitrogenGalil[player] = true
        
        strip_user_weapons
(player)
        
        
give_item(player"weapon_knife")
        
        
give_item(player"weapon_galil")
        
        
cs_set_user_bpammo(playerCSW_GALIL300)  
        
        new 
gcName[32]
        
        
get_user_name(playergcNamecharsmax(gcName))
        
        
set_hudmessage(34138255, -1.00.1710.05.01.01.0, -1)
        
        
ShowSyncHudMsg(0g_HudSync"%L"LANG_PLAYER"NOTICE_NG"gcName
    }
}

//___________/ ZP User Infected \___________________________________________________________________________________________
//**************************************************************************************************************************/
public zp_user_infected_post(infectedinfector)
{
    if (
g_NitrogenGalil[infected])
    {
        
g_NitrogenGalil[infected] = false
    
}
}

//___________/ Event Round Start \___________________________________________________________________________________________
//**************************************************************************************************************************/
public event_round_start()
{
    for (new 
1<= g_iMaxPlayersi++)
    {
        if (!
is_user_connected(i))
            continue
        
        if (
g_NitrogenGalil[i])
        {
            
g_NitrogenGalil[i] = false
        
}
        if(
g_FrozeN[i])
        {
            
g_FrozeN[i] = false
        
}
    }
}

//___________/ TakeDamage \___________________________________________________________________________________________
//**************************************************************************************************************************/
public fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if(!
is_user_connected(attacker) || !is_user_connected(victim) || zp_get_user_nemesis(victim) || attacker == victim || !attacker)
    return 
HAM_IGNORED
    
    
// For Frost Effect Ring
    
static Float:originF[3]
    
pev(victimpev_originoriginF)
    
    
// For Frost Effect Sound
    
static originF2[3
    
get_user_origin(victimoriginF2)
        
    if (
g_NitrogenGalil[attacker] && get_user_weapon(attacker) == CSW_GALIL)
    {    
        
FrostEffect(victim)
        
        
FrostEffectRing(originF
        
        
FrostEffectSound(originF2)  
        
        
client_print(attackerprint_center"%L"LANG_PLAYER"ENEMY_FROST_NG")
    }
    else
    {
        if(
g_NitrogenGalil[attacker])
        {
            
client_print(attackerprint_center"%L"LANG_PLAYER"ONLY_NG")
        }
    }
     
    
    if(
zp_get_user_nemesis(victim))
    {
        
client_print(attackerprint_center"%L"LANG_PLAYER"NEMESIS_INMUNE_NG")
        
        return 
HAM_IGNORED
    
}
    return 
PLUGIN_HANDLED;
}

//___________/ Event Cur Weapon \___________________________________________________________________________________________
//**************************************************************************************************************************/
public event_CurWeapon(id)
{
    if (!
is_user_alive(id))
        return 
PLUGIN_CONTINUE
        
    g_Weapon
[id] = read_data(2)
    
    if(
zp_get_user_zombie(id) || zp_get_user_survivor(id))
        return 
PLUGIN_CONTINUE
        
    
if(!g_NitrogenGalil[id] || g_Weapon[id] != CSW_GALIL
        return 
PLUGIN_CONTINUE
        
    entity_set_string
(idEV_SZ_viewmodel"models/zombie_plague/v_nitrogen_galil.mdl"
    
    return 
PLUGIN_CONTINUE
}

//___________/ Player Pre Think \___________________________________________________________________________________________
//**************************************************************************************************************************/
// Forward Player PreThink
public fw_PlayerPreThink(id)
{
    
// Not alive
    
if (!is_user_alive(id))
        return;
        
    
// Set Player MaxSpeed
    
if (g_FrozeN[id]) 
    {
        
set_pev(idpev_velocityFloat:{0.0,0.0,0.0}) // stop motion
        
set_pev(idpev_maxspeed1.0// prevent from moving
    
}
    else 
    {
        if(!
zp_get_user_zombie(id))
        {
            
set_pev(idpev_maxspeedget_pcvar_float(BackSpeed1)) // Change this in Cvar if you Want
        
}
        else
        {
            
set_pev(idpev_maxspeedget_pcvar_float(BackSpeed2)) // Change this in Cvar if you Want
        
}
    }
}  
    
//___________/ Effects \___________________________________________________________________________________________
//**************************************************************************************************************************/
// Frost Effect
public FrostEffect(id)
{
    
// Only effect alive unfrozen zombies
    
if (!is_user_alive(id) || !zp_get_user_zombie(id) || g_FrozeN[id])
    return;
    
    
message_begin(MSG_ONE_UNRELIABLEg_msgScreenFade_id)
    
write_short(UNIT_SECOND*1// duration
    
write_short(UNIT_SECOND*1// hold time
    
write_short(0x0000// fade type
    
write_byte(0// red
    
write_byte(50// green
    
write_byte(200// blue
    
write_byte(100// alpha
    
message_end()
    
    
// Light blue glow while frozen
    #if defined HANDLE_MODELS_ON_SEPARATE_ENT
    
fm_set_rendering(g_ent_playermodel[id], kRenderFxGlowShell0100200kRenderNormal25)
    
#else
    
fm_set_rendering(idkRenderFxGlowShell0100200kRenderNormal25)
    
#endif
    
    
g_FrozeN[id] = true
    set_task
(get_pcvar_float(FrostTime), "RemoveFrost"id// Time to Remove Frost Effect 
}

// Frost Effect Sound
public FrostEffectSound(iOrigin[3])
{
    new 
Entity create_entity("info_target")
    
    new 
Float:flOrigin[3]
    
IVecFVec(iOriginflOrigin)
    
    
entity_set_origin(EntityflOrigin)
    
    
emit_sound(EntityCHAN_WEAPON"warcraft3/impalehit.wav"VOL_NORMATTN_NORM0PITCH_NORM)
    
    
remove_entity(Entity)
}

// Frost Effect Ring
FrostEffectRing(const Float:originF3[3])
{
    
// Largest ring
    
engfunc(EngFunc_MessageBeginMSG_PVSSVC_TEMPENTITYoriginF30)
    
write_byte(TE_BEAMCYLINDER// TE id
    
engfunc(EngFunc_WriteCoordoriginF3[0]) // x
    
engfunc(EngFunc_WriteCoordoriginF3[1]) // y
    
engfunc(EngFunc_WriteCoordoriginF3[2]) // z
    
engfunc(EngFunc_WriteCoordoriginF3[0]) // x axis
    
engfunc(EngFunc_WriteCoordoriginF3[1]) // y axis
    
engfunc(EngFunc_WriteCoordoriginF3[2]+100.0// z axis
    
write_short(NitrogenGalilSpr// sprite
    
write_byte(0// startframe
    
write_byte(0// framerate
    
write_byte(4// life
    
write_byte(60// width
    
write_byte(0// noise
    
write_byte(41// red
    
write_byte(138// green
    
write_byte(255// blue
    
write_byte(200// brightness
    
write_byte(0// speed
    
message_end()
}

// Remove Frost Effect
public RemoveFrost(id)
{
    
// Not alive or not frozen anymore
    
if (!is_user_alive(id) || !g_FrozeN[id])
        return;
    
    
// Unfreeze
    
g_FrozeN[id] = false;
    
    
// Remove glow
    #if defined HANDLE_MODELS_ON_SEPARATE_ENT
    
fm_set_rendering(g_ent_playermodel[id])
    
#else
    
fm_set_rendering(id)
    
#endif
}

// Set entity's rendering type (from fakemeta_util)
stock fm_set_rendering(entityfx kRenderFxNone255255255render kRenderNormalamount 16)
{
    static 
Float:color[3]
    
color[0] = float(r)
    
color[1] = float(g)
    
color[2] = float(b)
    
    
set_pev(entitypev_renderfxfx)
    
set_pev(entitypev_rendercolorcolor)
    
set_pev(entitypev_rendermoderender)
    
set_pev(entitypev_renderamtfloat(amount))


Last edited by Xen0n; 01-30-2012 at 13:11.
Xen0n is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-30-2012 , 13:31   Re: [ZP] Velocidad de zombies
#3

porque el plugin modifica el speed y no returnea con los settings defaults del zp.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Xen0n
BANNED
Join Date: Nov 2011
Old 01-30-2012 , 13:39   Re: [ZP] Velocidad de zombies
#4

pero vi en otro servidor en el que la misma maquina le usaba y los zm funcionaban totalmente bien, no sabria usted alguna solucion o metodo para que funcione?
Xen0n is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-30-2012 , 14:43   Re: [ZP] Velocidad de zombies
#5

No dije que fuese imposible , dije que el plugin ese no esta modificado para returnear los valores default que vienen del ZP.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.

Last edited by lucas_7_94; 01-30-2012 at 14:43.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
Xen0n
BANNED
Join Date: Nov 2011
Old 01-30-2012 , 15:29   Re: [ZP] Velocidad de zombies
#6

vale gracias si por casualidad me quiere usted ayudar haciendomelo (sin animo a obligación lo mas mínimo se lo agradeceria ^^)
Xen0n is offline
lucas_7_94
Leche Loco
Join Date: Mar 2009
Location: Argentina
Old 01-30-2012 , 15:35   Re: [ZP] Velocidad de zombies
#7

intenta cambiar la parte de playerprethink por

Code:
public fw_PlayerPreThink(id) {     // Not alive     if (!is_user_alive(id))         return;         // Set Player MaxSpeed     if (g_FrozeN[id])     {         set_pev(id, pev_velocity, Float:{0.0,0.0,0.0}) // stop motion         set_pev(id, pev_maxspeed, 1.0) // prevent from moving     }             return FMRES_OVERRIDE }

No estoy seguro que funcione , habria que jugar con los returns , no me los se de memoria.
__________________
ATWWMH - MiniDuels
Madness is like gravity, just need a little push.
lucas_7_94 is offline
Send a message via Skype™ to lucas_7_94
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 01-30-2012 , 19:42   Re: [ZP] Velocidad de zombies
#8

hace esto.. obtene la velocidad maxima del zombie y guardala en una variable(float) y despues se lo pones en el prethink en la parte de zombie
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
Xen0n
BANNED
Join Date: Nov 2011
Old 01-31-2012 , 13:49   Re: [ZP] Velocidad de zombies
#9

me sale un error pero no se como copiar lo que sale en la ventana no me deja pulsar botón derecho de ratón para copiarlo ni nada, me pueden decir como hacerlo y así poder proporcionarles mayor información sobe el error por favor?


PD: gracias por el PHP que ofreciste

Last edited by Xen0n; 01-31-2012 at 13:50.
Xen0n is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 01-31-2012 , 13:52   Re: [ZP] Velocidad de zombies
#10

Quote:
Originally Posted by Xen0n View Post
me sale un error pero no se como copiar lo que sale en la ventana no me deja pulsar botón derecho de ratón para copiarlo ni nada, me pueden decir como hacerlo y así poder proporcionarles mayor información sobe el error por favor?


PD: gracias por el PHP que ofreciste
Escribi lo que dice, no es tan largo
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode