Raised This Month: $32 Target: $400
 8% 

base builder zombie speed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 01-16-2022 , 14:41   base builder zombie speed
Reply With Quote #1

hi i wonder if its possible

when i make speed item in shop for zombie it doesnt change speed for zombie
but it work for builder if classic zm speed is 270 and i put speed item in shop with set_user_maxspeed(id, 400.0) it still will have 270 speed is there any other code for bb to change zm speed?
its work only on its registered speed and cant be changed with this code.

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>

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

// Classic Zombie Attributes
new const zclass1_name[] = { "Classic" }
new const 
zclass1_info[] = { "HP:3500 SP:270 JM:0.8 \r[Free]" }
new const 
zclass1_model[] = { "classiczm" }
new const 
zclass1_clawmodel[] = { "v_classiczm" }
const 
zclass1_health 3500
const zclass1_speed 270
const Float:zclass1_gravity 0.8
const zclass1_adminflags ADMIN_ALL

// Tanker Attributes
new const zclass2_name[] = { "Tanker" }
new const 
zclass2_info[] = { "HP:4500 SP:210 JM:1.0 \r[Free]" }
new const 
zclass2_model[] = { "tankerzm" }
new const 
zclass2_clawmodel[] = { "v_tankerzm" }
const 
zclass2_health 4500
const zclass2_speed 210
const Float:zclass2_gravity 1.0
const zclass2_adminflags ADMIN_ALL

// Husk Attributes
new const zclass3_name[] = { "Husk" }
new const 
zclass3_info[] = { "HP:2700 SP:300 JM:0.8 \r[Free]" }
new const 
zclass3_model[] = { "huskzm" }
new const 
zclass3_clawmodel[] = { "v_huskzm" }
const 
zclass3_health 2700
const zclass3_speed 300
const Float:zclass3_gravity 0.8
const zclass3_adminflags ADMIN_ALL

// Doctor Attributes
new const zclass4_name[] = { "Doctor" }
new const 
zclass4_info[] = { "HP:4000 SP:280 JM:0.7 \r[Free]" }
new const 
zclass4_model[] = { "doctorzm" }
new const 
zclass4_clawmodel[] = { "v_doctorzm" }
const 
zclass4_health 4000
const zclass4_speed 280
const Float:zclass4_gravity 0.7
const zclass4_adminflags ADMIN_ALL

// Death Attributes
new const zclass5_name[] = { "Death" }
new const 
zclass5_info[] = { "HP:3500 SP:300 JM:0.5 \r[Helper]" }
new const 
zclass5_model[] = { "hairzm" }
new const 
zclass5_clawmodel[] = { "v_hairzm" }
const 
zclass5_health 3500
const zclass5_speed 300
const Float:zclass5_gravity 0.5
const zclass5_adminflags ADMIN_LEVEL_B

// Nemesis Attributes
new const zclass6_name[] = { "Nemesis" }
new const 
zclass6_info[] = { "HP:5500 SP:240 JM:0.9 \r[VIP]" }
new const 
zclass6_model[] = { "alienzm" }
new const 
zclass6_clawmodel[] = { "v_alienzm" }
const 
zclass6_health 5500
const zclass6_speed 240
const Float:zclass6_gravity 0.9
const zclass6_adminflags ADMIN_LEVEL_D

// Venom Attributes
new const zclass7_name[] = { "Venom" }
new const 
zclass7_info[] = { "HP:5200 SP:285 JM:0.6 \r[Admin]" }
new const 
zclass7_model[] = { "venomzm" }
new const 
zclass7_clawmodel[] = { "v_venomzm" }
const 
zclass7_health 5200
const zclass7_speed 285
const Float:zclass7_gravity 0.6
const zclass7_adminflags ADMIN_LEVEL_C

// Frost Attributes
new const zclass8_name[] = { "Frost" }
new const 
zclass8_info[] = { "HP:4800 SP:320 JM:0.5 \r[Mod]" }
new const 
zclass8_model[] = { "frostzm" }
new const 
zclass8_clawmodel[] = { "v_frostzm" }
const 
zclass8_health 4800
const zclass8_speed 320
const Float:zclass8_gravity 0.5
const zclass8_adminflags ADMIN_LEVEL_G

// Hunter Attributes
new const zclass9_name[] = { "Hunter" }
new const 
zclass9_info[] = { "HP:6000 SP:270 JM:0.8 \r[Owner]" }
new const 
zclass9_model[] = { "hunterzm" }
new const 
zclass9_clawmodel[] = { "v_hunterzm" }
const 
zclass9_health 6000
const zclass9_speed 270
const Float:zclass9_gravity 0.8
const zclass9_adminflags ADMIN_LEVEL_H


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

new g_zclass_tanker

// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
    
register_plugin("[BB] Default Zombie Classes""6.9""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)
        
bb_register_zombie_class(zclass9_namezclass9_infozclass9_modelzclass9_clawmodelzclass9_healthzclass9_speedzclass9_gravity0.0zclass9_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 
__________________
Hello!

Last edited by thebest24; 01-16-2022 at 14:42.
thebest24 is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 01-17-2022 , 14:14   Re: base builder zombie speed
Reply With Quote #2

Maximum speed is 320

Last edited by Uzviseni Bog; 01-17-2022 at 14:15.
Uzviseni Bog is offline
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 01-17-2022 , 14:18   Re: base builder zombie speed
Reply With Quote #3

Quote:
Originally Posted by Uzviseni Bog View Post
Maximum speed is 320
i edited it in server cfg so its 500
__________________
Hello!
thebest24 is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 01-17-2022 , 14:23   Re: base builder zombie speed
Reply With Quote #4

And does it work lol
Uzviseni Bog is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 01-26-2022 , 04:05   Re: base builder zombie speed
Reply With Quote #5

You can not put speed for the zombies from subplugin you need to edit the source code because it checking the zombie speed every respawn

Open source code and find the code that giving the zombie speed when using "bb_register_zombie" native and create a new native for that if you want using it on subplugins for example :

PHP Code:
new bool:iUseSpeed33 ]
set_user_maxspeedidiUseSpeedid ] ? Custom Speed : Array Code 
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 01-28-2022 , 14:25   Re: base builder zombie speed
Reply With Quote #6

Quote:
Originally Posted by Supremache View Post
You can not put speed for the zombies from subplugin you need to edit the source code because it checking the zombie speed every respawn

Open source code and find the code that giving the zombie speed when using "bb_register_zombie" native and create a new native for that if you want using it on subplugins for example :

PHP Code:
new bool:iUseSpeed33 ]
set_user_maxspeedidiUseSpeedid ] ? Custom Speed : Array Code 
thats in basebuilder.sma if bb_classes.sma?
__________________
Hello!
thebest24 is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 01-28-2022 , 14:33   Re: base builder zombie speed
Reply With Quote #7

in basebuilder.sma
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 01-28-2022 , 14:41   Re: base builder zombie speed
Reply With Quote #8

PHP Code:
new bool:g_iCustomSpeed33 ], iCustomSpeed33 ]

g_fPlayerSpeed[id] = g_iCustomSpeedid ] ? iCustomSpeedid ] : float(ArrayGetCell(g_zclass_spdg_iZombieClass[id]))/**g_fClassMultiplier[id][ATT_SPEED]*/
                
public plugin_natives( )
{
    
register_native"set_zombie_speed""_set_zombie_speed" )
}

//native set_zombie_speed( id, iHP )
public _set_zombie_speediPluginiParams )
{
    new 
id get_param), iSpeed get_param);
    
    
g_iCustomSpeedid ] = true;
    
iCustomSpeedid ] = iSpeed

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 01-28-2022 at 14:49.
Supremache is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 01-29-2022 , 08:09   Re: base builder zombie speed
Reply With Quote #9

Just setting set_user_maxspeed will not work as you expect. Post the source of the "speed item".
__________________








CrazY. is offline
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 01-29-2022 , 08:26   Re: base builder zombie speed
Reply With Quote #10

Quote:
Originally Posted by Supremache View Post
PHP Code:
new bool:g_iCustomSpeed33 ], iCustomSpeed33 ]

g_fPlayerSpeed[id] = g_iCustomSpeedid ] ? iCustomSpeedid ] : float(ArrayGetCell(g_zclass_spdg_iZombieClass[id]))/**g_fClassMultiplier[id][ATT_SPEED]*/
                
public plugin_natives( )
{
    
register_native"set_zombie_speed""_set_zombie_speed" )
}

//native set_zombie_speed( id, iHP )
public _set_zombie_speediPluginiParams )
{
    new 
id get_param), iSpeed get_param);
    
    
g_iCustomSpeedid ] = true;
    
iCustomSpeedid ] = iSpeed

after adding this i can use: set_zombie_zpeed(id, 400.0) ?
__________________
Hello!
thebest24 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 18:52.


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