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

Help / Support [REQ] Frost Zombie


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Narcos
Junior Member
Join Date: Nov 2017
Location: Germany
Old 12-01-2017 , 13:12   [REQ] Frost Zombie
Reply With Quote #1

Hello I Have Error In - Frost Zombie

Quote:
# Plugin :
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <zombieplaguenew1.3>

new const zclass_name[ ] = "Freezer"
new const zclass_info[ ] = "\r[Freez Human] \y[MOUSE2]"
new const zclass_model[ ] = "zp_zombie_freezer"
new const zclass_clawmodel[ ] = "zp_v_freezer.mdl"
const zclass_health 1000
const zclass_speed 250
const Float:zclass_gravity 0.60
const Float:zclass_knockback 1.00



new g_zclass_frost
new pcvar_distancepcvar_cooldownpcvar_freeze
new Bloqueado[33]
new 
Float:gLastUseCmd33 ]

new 
beamSpr;
new 
SayText;
new 
i_cooldown_time[33];
new 
Float:g_dropcooldown 20.00;
new 
g_maxplayers;

new 
free_sound[48] =

{

    
"zombie_plague/zp_freezer.wav"

}



public 
plugin_init( )

{

    
register_plugin"[ZP] Zombie Class: Frost Zombie""1.0""007" )

    

    
pcvar_distance register_cvar"zp_frost_distance""400" )

    
pcvar_cooldown register_cvar"zp_frost_cooldown""20.0" )

    
pcvar_freeze register_cvar"zp_frost_freeze_time""5.0" )

    
register_forward(FM_CmdStart"fw_Start")

    

    
register_logevent("roundStart"2"1=Round_Start");

    
SayText get_user_msgid("SayText");

    
g_maxplayers get_maxplayers();

}



public 
plugin_precache( )

{

    
g_zclass_frost zp_register_zombie_classzclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback )

    
/*frostsprite = precache_model( "sprites/nhth1.spr" )*/

    
beamSpr precache_model("sprites/zombie_plague/freezer_exp.spr");

    
precache_sound(free_sound);

}



public 
zp_user_infected_post(playerinfector)

{

    if (!
zp_get_user_zombie(player))

    {

        return 
0;

    }

    if (
zp_get_user_nemesis(player))

    {

        return 
0;

    }

    if (
zp_get_user_assassin(player))

    {

        return 
0;

    }

    if (
g_zclass_frost == zp_get_user_zombie_class(player))

    {

        
i_cooldown_time[player] = floatround(g_dropcooldownfloatround_round);

        
Narcos_Chat(player"!g[ZP]!y Your Ability Is !gFreez!y. Cooldown:!g 20 !ySeconds!g !");

    }

    return 
0;

}



public 
use_cmd(player)

{

    new 
target;    

    

    if (!
is_user_alive(player) || !zp_get_user_zombie(player) || g_zclass_frost == zp_get_user_zombie_class(player) || zp_get_user_nemesis(player) || zp_get_user_assassin(player))

    {

        return 
PLUGIN_HANDLED;

    }

    if (
get_gametime() - gLastUseCmd[player] < get_pcvar_float(pcvar_cooldown))

    {

        return 
PLUGIN_HANDLED;

    }

    if (
is_user_alive(target) && !zp_get_user_zombie(target))

    {

        
sprite_control(player);

        
zp_set_user_frozen(target);

        
Bloqueado[target] = true;

        
set_taskget_pcvar_floatpcvar_freeze ), "unfrozen_user"target );

    }

    else

    {

        
sprite_control(player);

    }

    return 
PLUGIN_HANDLED;

}



public 
unfrozen_usertarget )

{

    
zp_set_user_frozentarget)

    
Bloqueado[target] = false

}



public 
sqrtnum )

{

    new 
div num

    
new result 1

    
while( div result )

    {

        
div = ( div result ) / 2

        result 
num div

    
}

    return 
div

}



public 
sprite_control(id)

{

    static 
Float:start[3];

    static 
Float:aim[3];

    
pev(idpev_originstart);

    
fm_get_aim_origin(idaim);

    new 
frz1 start[2];

    
frz1 frz1[0] + 16.00;

    new 
frz2 aim[2];

    
frz2 var2[0] + 16.00;

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY21480);

    
write_byte(0);

    
engfunc(EngFunc_WriteCoordstart);

    
engfunc(EngFunc_WriteCoord2124 4);

    
engfunc(EngFunc_WriteCoord2124 8);

    
engfunc(EngFunc_WriteCoordaim);

    
engfunc(EngFunc_WriteCoord2136 4);

    
engfunc(EngFunc_WriteCoord2136 8);

    
write_short(beamSpr);

    
write_byte(0);

    
write_byte(30);

    
write_byte(10);

    
write_byte(100);

    
write_byte(10);

    
write_byte(0);

    
write_byte(100);

    
write_byte(200);

    
write_byte(100);

    
write_byte(50);

    
message_end();

    
emit_sound(idCHAN_WEAPONfree_sound1.000.800100);

    
set_task(get_pcvar_float(pcvar_cooldown), "reset_cooldown2"id);

    
i_cooldown_time[id] = floatround(g_dropcooldownfloatround_round);

    
set_task1.00"ShowHUD"id__"a",Countdown id ] );;



}



public 
reset_cooldown2(id)

{

    
Narcos_Chat(id"!g[ZP] !yNow. You Can Use Your Ability. Press !g[MOUSE2]");

}



public 
roundStart() 



    for (new 
1<= g_maxplayersi++) 

    { 

        
i_cooldown_time ] = floatround(g_dropcooldownfloatround_round

        
remove_task(i

    } 





public 
ShowHUD(id)

{

    if (
is_user_alive(id))

    {

        
i_cooldown_time[id] = i_cooldown_time[id] - 1;

        
set_hudmessage(025500.750.9201.001.100.000.00, -1);

        
show_hudmessage(id"Freez Ability: %d"i_cooldown_time[id]);

    }

    else

    {

        
remove_task(id);

    }

    return 
0;

}



public 
zp_user_humanized_post(id)

{

    
remove_task(id);

    return 
0;

}



public 
fw_Start(iduc_handleseed)

{

    new 
button get_uc(uc_handle,UC_Buttons)

    

    if(
Bloqueado[id] && !zp_get_user_zombie(id) && (button IN_USE || button IN_ATTACK))

        
set_uc(uc_handle,UC_Buttons,(button & ~IN_USE) & ~IN_ATTACK)

    

    if(
zp_get_user_zombie(id) && (button IN_ATTACK2) && zp_get_user_zombie_class(id) == g_zclass_frost && !zp_get_user_nemesis(id))

        
use_cmd(id)

}



stock Narcos_Chat(const id, const input[], any:...) 

{

    static 
msg[191]; new count 1players[32];

    
vformat(msg190input3);

    

    
replace_all(msg190"!g""^4");

    
replace_all(msg190"!n""^1");

    
replace_all(msg190"!t""^3");

    

    if(
idplayers[0] = id; else get_players(playerscount"ch"); {

        for (new 
0counti++)

        {

            if (
is_user_connected(players[i]))

            {

                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);

                
write_byte(players[i]);

                
write_string(msg);

                
message_end();

            }

        }

    }


Quote:
# Error :
PHP Code:

zp_class_frost_v2
.sma(90) : error 017undefined symbol "zp_set_user_frozen"
zp_class_frost_v2.sma(103) : error 017undefined symbol "zp_set_user_frozen"
zp_class_frost_v2.sma(124) : error 017undefined symbol "fm_get_aim_origin"
zp_class_frost_v2.sma(125) : warning 213tag mismatch
zp_class_frost_v2
.sma(126) : error 028invalid subscript (not an array or too many subscripts): "frz1"
zp_class_frost_v2.sma(126) : warning 215expression has no effect
zp_class_frost_v2
.sma(126) : error 001expected token";"but found "]"
zp_class_frost_v2.sma(126) : error 029invalid expressionassumed zero
zp_class_frost_v2
.sma(126) : fatal error 107too many error messages on one line

Compilation aborted
.
7 Errors
Narcos 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 19:56.


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