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

Help / Support ZP 5.0 Class Frost


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Hn.S Xmix
Member
Join Date: May 2021
Old 01-26-2023 , 18:12   ZP 5.0 Class Frost
Reply With Quote #1

Hello!

This class work fine but i don't understand how is that work.... i mean when i use this class every class has same power even *Balanced Classic zombie* which is crazy..
can anyone solve this please i try all day but nothing happen

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
#include <zp50_grenade_frost>
#include <ColorChat>

new const zclass_name[ ] = "Frost Zombie"
new const zclass_info[ ] = "Freezing Humans"
new const zclass_model[ ] = "frost_zombie"
new const zclass_clawmodel[ ] = "v_knife_frost.mdl"
const zclass_health 1700
const zclass_speed 230
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.5

new g_zclass_frostfrostsprite
new pcvar_distancepcvar_cooldown1pcvar_freeze
new Bloqueado[33]
new 
Float:gLastUseCmd33 ]

public 
plugin_init( )
{
    
register_plugin"[ZP] Zombie Class: Frost Zombie""1.0""007" )
    
    
pcvar_distance register_cvar"zp_frost_distance""400" )
    
pcvar_cooldown1 register_cvar"zp_frost_cooldown""20.0" )
    
pcvar_freeze register_cvar"zp_frost_freeze_time""2.0" )
    
register_forward(FM_CmdStart"fw_Start")
}

public 
plugin_precache( )
{
    
g_zclass_frost zp_register_zombie_classzclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback )
    
frostsprite precache_model"sprites/nhth1.spr" )
}

public 
zp_user_infected_postplayerinfector )
{
    if( 
zp_get_user_zombie_classplayer ) == g_zclass_frost )
    {
        
ColorChat(playerGREEN"^x01[^x04ZPM^x01] You're class is ^x04[^x01 Frost Zombie ^x04]^x01 Your Skills :^x03 Freezing Humans." )
    }
}

public 
use_cmdplayer )
{
    
    if( !
is_user_aliveplayer ) || !zp_get_user_zombieplayer ) )
        return 
PLUGIN_HANDLED
    
    
if( get_gametime( ) - gLastUseCmdplayer ] < get_pcvar_flagspcvar_cooldown1 ) )
    {
             
set_hudmessage(17900, -1.00.2820.021.00.010.110);    
        if (
pcvar_cooldown1 != 1)
        
show_hudmessage(0"You need to wait for^x03 %.f^x01 sec. to use froze again!"get_pcvar_numpcvar_cooldown1 ) - ( get_gametime( ) - gLastUseCmdplayer ] ) )
        
        return 
PLUGIN_HANDLED
    
}
    
    
gLastUseCmdplayer ] = get_gametime( )
    
    new 
targetbody
    get_user_aiming
playertargetbodyget_pcvar_numpcvar_distance ) )
    
    if( 
is_user_alivetarget ) && !zp_get_user_zombietarget ) )
    {
        
sprite_controlplayer )
        
zp_grenade_frost_settarget)
        
Bloqueado[target] = true
        set_task
get_pcvar_floatpcvar_freeze ), "unfrozen_user"target )
    }
    else
    {
        
sprite_controlplayer )
    }
    return 
PLUGIN_HANDLED
}

public 
unfrozen_usertarget )
{
    
zp_grenade_frost_settarget)
    
Bloqueado[target] = false
}

public 
te_sprayargs[ ] )
{
    
message_beginMSG_BROADCAST,SVC_TEMPENTITY )
    
write_byte120 // Throws a shower of sprites or models
    
write_coordargs] ) // start pos
    
write_coordargs] )
    
write_coordargs] )
    
write_coordargs] ) // velocity
    
write_coordargs] )
    
write_coordargs] )
    
write_shortfrostsprite // spr
    
write_byte// count
    
write_byte70 // speed
    
write_byte100 //(noise)
    
write_byte// (rendermode)
    
message_end( )
    
    return 
PLUGIN_CONTINUE
}

public 
sqrtnum )
{
    new 
div num
    
new result 1
    
while( div result )
    {
        
div = ( div result ) / 2
        result 
num div
    
}
    return 
div
}

public 
sprite_controlplayer )
{
    new 
vec]
    new 
aimvec]
    new 
velocityvec]
    new 
length
    
new speed 10
    
    get_user_origin
playervec )
    
get_user_originplayeraimvec)
    
    
velocityvec] = aimvec] - vec]
    
velocityvec] = aimvec] - vec]
    
velocityvec] = aimvec] - vec]
    
length sqrtvelocityvec] * velocityvec] + velocityvec] * velocityvec] + velocityvec] * velocityvec] )
    
velocityvec] = velocityvec] * speed length
    velocityvec
] = velocityvec] * speed length
    velocityvec
] = velocityvec] * speed length
    
    
new args]
    
args] = vec]
    
args] = vec]
    
args] = vec]
    
args] = velocityvec]
    
args] = velocityvec]
    
args] = velocityvec]
    
    
set_task0.1"te_spray"0args8"a")
    
}

public 
fw_Start(iduc_handleseed)
{
    new 
button get_uc(uc_handle,UC_Buttons)
    
    if(
Bloqueado[id] && !zp_get_user_zombie(id) && (button IN_ATTACK || button IN_ATTACK2))
        
set_uc(uc_handle,UC_Buttons,(button & ~IN_ATTACK) & ~IN_ATTACK2)
    
    if(
zp_get_user_zombie(id) && (button IN_ATTACK2))
        
use_cmd(id)

Attached Files
File Type: sma Get Plugin or Get Source (zp_class_frost.sma - 48 views - 4.6 KB)
Hn.S Xmix is offline
Reply



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 15:19.


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