Raised This Month: $ Target: $400
 0% 

Lets See What are u capable of? :"D


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RockyRock123
Junior Member
Join Date: Jan 2018
Old 01-15-2018 , 06:21   Lets See What are u capable of? :"D
Reply With Quote #1

As I am new in editing Plugins
So I cant figure out how to do this
I have scripting of frost zm and zm classes but dont know how to add frost zombie in zm classes with its ability

Frost Scripting (by excalibue.007):

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

new const zclass_name[ ] = "Frost Zombie"
new const zclass_info[ ] = "Press E to use frost"
new const zclass_model[ ] = "frost_zombie"
new const zclass_clawmodel[ ] = "v_knife_frost.mdl"
const zclass_health 1000
const zclass_speed 240
const Float:zclass_gravity 0.5
const Float:zclass_knockback 1.0

new g_zclass_frostfrostsprite
new pcvar_distancepcvar_cooldownpcvar_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_cooldown register_cvar"zp_frost_cooldown""10.0" )
    
pcvar_freeze register_cvar"zp_frost_freeze_time""5.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 )
    {
        
client_printplayerprint_chat"[ZP] Press E to use frost!" )
    }
}

public 
use_cmdplayer )
{
    
    if( !
is_user_aliveplayer ) || !zp_get_user_zombieplayer ) || zp_get_user_zombie_classplayer ) != g_zclass_frost || zp_get_user_nemesisplayer ))
        return 
PLUGIN_HANDLED
    
    
if( get_gametime( ) - gLastUseCmdplayer ] < get_pcvar_floatpcvar_cooldown ) )
    {
        
client_printplayerprint_chat"[ZP] You need to wait for %.f0 sec. to use froze again!"get_pcvar_floatpcvar_cooldown ) - ( 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_set_user_frozentarget)
        
Bloqueado[target] = true
        set_task
get_pcvar_floatpcvar_freeze ), "unfrozen_user"target )
    }
    else
    {
        
sprite_controlplayer )
    }
    return 
PLUGIN_HANDLED
}

public 
unfrozen_usertarget )
{
    
zp_set_user_frozentarget)
    
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_USE) && zp_get_user_zombie_class(id) == g_zclass_frost && !zp_get_user_nemesis(id))
        
use_cmd(id)

Zm Classes scripting:

PHP Code:
/*================================================================================
    
    -----------------------------------
    -*- [BB] Default Zombie Classes -*-
    -----------------------------------
    
    ~~~~~~~~~~~~~~~
    - Description -
    ~~~~~~~~~~~~~~~
    
    This plugin adds the default zombie classes from Zombie Plague
    into Base Builder. All credit belongs to MeRcyLeZZ.
    
    All classes have been balanced, but feel free to edit them if
    you are not satisfied.
    
================================================================================*/

#include <amxmodx>
#include <basebuilder>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <zombieplague>

/*================================================================================
 [Plugin Customization]
=================================================================================*/

// Classic Zombie Attributes
new const zclass1_name[] = { "Classic Zombie" }
new const 
zclass1_info[] = { "=Standard=" }
new const 
zclass1_model[] = { "bb_classic22" }
new const 
zclass1_clawmodel[] = { "v_classic22" }
const 
zclass1_health 4000
const zclass1_speed 260
const Float:zclass1_gravity 1.0
const zclass1_adminflags ADMIN_ALL

// Fast Zombie Attributes
new const zclass2_name[] = { "Fast Zombie" }
new const 
zclass2_info[] = { "HP- Speed+++ Jump+" }
new const 
zclass2_model[] = { "bb_fast" }
new const 
zclass2_clawmodel[] = { "v_bloodyhands" }
const 
zclass2_health 2500
const zclass2_speed 325
const Float:zclass2_gravity 1.0
const zclass2_adminflags ADMIN_ALL

// Jumper Zombie Attributes
new const zclass3_name[] = { "Jumper Zombie" }
new const 
zclass3_info[] = { "HP+ Speed+ Jump+++" }
new const 
zclass3_model[] = { "bb_jumper" }
new const 
zclass3_clawmodel[] = { "v_bloodyhands" }
const 
zclass3_health 3000
const zclass3_speed 285
const Float:zclass3_gravity 0.5
const zclass3_adminflags ADMIN_ALL

// Tanker Zombie Attributes
new const zclass4_name[] = { "Tanker Zombie" }
new const 
zclass4_info[] = { "HP+++ Speed- Jump+" }
new const 
zclass4_model[] = { "bb_tanker22" }
new const 
zclass4_clawmodel[] = { "v_bloodyhands" }
const 
zclass4_health 5500
const zclass4_speed 205
const Float:zclass4_gravity 1.0
const zclass4_adminflags ADMIN_ALL 
 
 
// Jockey Zombie Attributes
new const zclass5_name[] = { "Jockey Zombie" }
new const 
zclass5_info[] = { "HP-- Speed++ Jump++" }
new const 
zclass5_model[] = { "bb_jockey22" }
new const 
zclass5_clawmodel[] = { "v_jockey22" }
const 
zclass5_health 2000
const zclass5_speed 300
const Float:zclass5_gravity 0.5
const zclass5_adminflags ADMIN_ALL  
 
 
// Agent-1 Zombie Attributes
new const zclass6_name[] = { "Agent-1 Zombie" }
new const 
zclass6_info[] = { "HP+ Speed+ Jump+" }
new const 
zclass6_model[] = { "bb_agent1_22" }
new const 
zclass6_clawmodel[] = { "v_knife" }
const 
zclass6_health 3500
const zclass6_speed 290
const Float:zclass6_gravity 1.0
const zclass6_adminflags ADMIN_ALL  
 
 
// Agent-2 Zombie Attributes
new const zclass7_name[] = { "Agent-2 Zombie" }
new const 
zclass7_info[] = { "HP+ Speed+ Jump+" }
new const 
zclass7_model[] = { "bb_agent2_22" }
new const 
zclass7_clawmodel[] = { "v_knife" }
const 
zclass7_health 3500
const zclass7_speed 290
const Float:zclass7_gravity 1.0
const zclass7_adminflags ADMIN_ALL 
 
 
// Lysing Zombie Attributes
new const zclass8_name[] = { "Lysing Zombie" }
new const 
zclass8_info[] = { "HP++ Speed++ Jump++" }
new const 
zclass8_model[] = { "bb_lysing22" }
new const 
zclass8_clawmodel[] = { "v_lysing22" }
const 
zclass8_health 4500
const zclass8_speed 299
const Float:zclass8_gravity 0.7
const zclass8_adminflags ADMIN_ALL   

#define TANK_ARMOR 200

/*============================================================================*/

new g_zclass_tanker

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
    
register_plugin("[BB] Default Zombie Classes""6.5""Tirant")
    
    
// Register all classes
    
bb_register_zombie_class(zclass1_namezclass1_infozclass1_modelzclass1_clawmodelzclass1_healthzclass1_speedzclass1_gravity0.0zclass1_adminflags)
    
bb_register_zombie_class(zclass2_namezclass2_infozclass2_modelzclass2_clawmodelzclass2_healthzclass2_speedzclass2_gravity0.0zclass2_adminflags)
    
bb_register_zombie_class(zclass3_namezclass3_infozclass3_modelzclass3_clawmodelzclass3_healthzclass3_speedzclass3_gravity0.0zclass3_adminflags)
    
g_zclass_tanker bb_register_zombie_class(zclass4_namezclass4_infozclass4_modelzclass4_clawmodelzclass4_healthzclass4_speedzclass4_gravity0.0zclass4_adminflags
    
bb_register_zombie_class(zclass5_namezclass5_infozclass5_modelzclass5_clawmodelzclass5_healthzclass5_speedzclass5_gravity0.0zclass5_adminflags)
    
bb_register_zombie_class(zclass6_namezclass6_infozclass6_modelzclass6_clawmodelzclass6_healthzclass6_speedzclass6_gravity0.0zclass6_adminflags)
    
bb_register_zombie_class(zclass7_namezclass7_infozclass7_modelzclass7_clawmodelzclass7_healthzclass7_speedzclass7_gravity0.0zclass7_adminflags
    
bb_register_zombie_class(zclass8_namezclass8_infozclass8_modelzclass8_clawmodelzclass8_healthzclass8_speedzclass8_gravity0.0zclass8_adminflags)   


}

#if defined TANK_ARMOR
public plugin_init()
{
    
RegisterHam(Ham_Spawn"player""ham_PlayerSpawn_Post"1)
}

public 
ham_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id))
        return ;
        
    if (
bb_is_user_zombie(id) && bb_get_user_zombie_class(id) == g_zclass_tanker)
    {
        
give_item(id"item_assaultsuit");
        
cs_set_user_armor(idTANK_ARMORCS_ARMOR_VESTHELM);
    }
}
#endif
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 

Last edited by RockyRock123; 01-16-2018 at 12:24.
RockyRock123 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 01-18-2018 , 09:31   Re: Lets See What are u capable of? :"D
Reply With Quote #2

Maybe this:

PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <basebuilder> 
#include <zombieplague>

new const zclass_name[ ] = "Frost Zombie" 
new const zclass_info[ ] = "Press E to use frost" 
new const zclass_model[ ] = "frost_zombie" 
new const zclass_clawmodel[ ] = "v_knife_frost.mdl" 
const zclass_health 1000 
const zclass_speed 240 
const Float:zclass_gravity 0.5 
const Float:zclass_knockback 1.0 

new g_zclass_frostfrostsprite 
new pcvar_distancepcvar_cooldownpcvar_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_cooldown register_cvar"zp_frost_cooldown""10.0" 
    
pcvar_freeze register_cvar"zp_frost_freeze_time""5.0" 
    
register_forward(FM_CmdStart"fw_Start"


public 
plugin_precache( ) 

    
g_zclass_frost bb_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravity0.0zclass_adminflags
    
frostsprite precache_model"sprites/nhth1.spr" 


public 
zp_user_infected_postplayerinfector 

    if( 
bb_get_user_zombie_classplayer ) == g_zclass_frost 
    { 
        
client_printplayerprint_chat"[ZP] Press E to use frost!" 
    } 


public 
use_cmdplayer 

     
    if( !
is_user_aliveplayer ) || !zp_get_user_zombieplayer ) || zp_get_user_zombie_classplayer ) != g_zclass_frost || zp_get_user_nemesisplayer )) 
        return 
PLUGIN_HANDLED 
     
    
if( get_gametime( ) - gLastUseCmdplayer ] < get_pcvar_floatpcvar_cooldown ) ) 
    { 
        
client_printplayerprint_chat"[ZP] You need to wait for %.f0 sec. to use froze again!"get_pcvar_floatpcvar_cooldown ) - ( 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_set_user_frozentarget
        
Bloqueado[target] = true 
        set_task
get_pcvar_floatpcvar_freeze ), "unfrozen_user"target 
    } 
    else 
    { 
        
sprite_controlplayer 
    } 
    return 
PLUGIN_HANDLED 


public 
unfrozen_usertarget 

    
zp_set_user_frozentarget
    
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 
    
while( div result 
    { 
        
div = ( div result ) / 
        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_USE) && zp_get_user_zombie_class(id) == g_zclass_frost && !zp_get_user_nemesis(id)) 
        
use_cmd(id

eyal282 is offline
RockyRock123
Junior Member
Join Date: Jan 2018
Old 01-18-2018 , 13:21   Re: Lets See What are u capable of? :"D
Reply With Quote #3

and what about this error

Click image for larger version

Name:	Capture.PNG
Views:	178
Size:	24.8 KB
ID:	168010
RockyRock123 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-18-2018 , 13:35   Re: Lets See What are u capable of? :"D
Reply With Quote #4

Quote:
#include <basebuilder>
#include <zombieplague>
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 09:11.


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