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

Solved ZombieBasebuilder.ini


Post New Thread Reply   
 
Thread Tools Display Modes
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-15-2020 , 21:49   Re: ZombieBasebuilder.ini
Reply With Quote #21

Quote:
Originally Posted by Foxa View Post
Yes, that should work, since thats how you change a cvar value with a pointer cvar, what you did the code that you posted does NOTHING.
I did it and i got this erorr
HTML Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Number of arguments does not match definition on line 3543
Error: Number of arguments does not match definition on line 3545
Error: Number of arguments does not match definition on line 3547
Error: Number of arguments does not match definition on line 3549
Error: Number of arguments does not match definition on line 3551
Error: Number of arguments does not match definition on line 3553
Error: Number of arguments does not match definition on line 3555
Error: Number of arguments does not match definition on line 3557
Error: Number of arguments does not match definition on line 3559
Error: Number of arguments does not match definition on line 3561
Error: Number of arguments does not match definition on line 3563
Error: Number of arguments does not match definition on line 3565
Error: Number of arguments does not match definition on line 3567
Error: Number of arguments does not match definition on line 3569

14 Errors.
Could not locate output file C:\Users\mohamed\Desktop\BaseBuilderNew.amx (compile failed).
Supremache is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 07-16-2020 , 04:15   Re: ZombieBasebuilder.ini
Reply With Quote #22

Are you editing the actual mods source code? Because what you're asking for should have 3500 lines of code.
What exactly did you DO? I tried to compile something really stupid (that uses the same thing that I posted before) and it compiled just fine:
Spoiler

Last edited by Foxa; 07-16-2020 at 04:16.
Foxa is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-16-2020 , 07:42   Re: ZombieBasebuilder.ini
Reply With Quote #23

Quote:
Originally Posted by Foxa View Post
Are you editing the actual mods source code? Because what you're asking for should have 3500 lines of code.
What exactly did you DO? I tried to compile something really stupid (that uses the same thing that I posted before) and it compiled just fine:
Spoiler
Oh, i added = no , but this still no work when i change the cvar from .ini file no thing happeing

PHP Code:
case SECTION_CVARS:
            {
                if (
equal(key"BUILD TIME"))
                    
set_pcvar_num(g_eSettings[CVARS_BUILD_TIME], str_to_num(value))
                if (
equal(key"PREP TIME"))
                     
set_pcvar_num(g_eSettings[CVARS_PREP_TIME], str_to_num(value))
                if (
equal(key"ZOMBIE RESPAWN DELAY"))
                    
set_pcvar_num(g_eSettings[CVARS_ZOMBIE_RESPAWN_DELAY], str_to_num(value))
                if (
equal(key"SURVIVOR RESPAWN INFECTION DELAY"))
                    
set_pcvar_num(g_eSettings[CVARS_INFECTION_RESPAWN], str_to_num(value))
                if (
equal(key"SHOW MOVERS"))
                    
set_pcvar_num(g_eSettings[CVARS_SHOW_MOVERS], str_to_num(value))
                if (
equal(key"LOCK BLOCKS"))
                    
set_pcvar_num(g_eSettings[CVARS_LOCK_BLOCKS], str_to_num(value))
                if (
equal(key"LOCK MAX"))
                    
set_pcvar_num(g_eSettings[CVARS_LOCK_MAX], str_to_num(value))
                if (
equal(key"COLOR MOD <0/1/2>"))
                    
set_pcvar_num(g_eSettings[CVARS_COLOR_MOD], str_to_num(value))
                if (
equal(key"PUSH CEILING"))
                    
set_pcvar_num(g_eSettings[CVARS_MAX_MOVE_DIST], str_to_num(value))
                if (
equal(key"PULL FLOOR"))
                    
set_pcvar_num(g_eSettings[CVARS_MIN_MOVE_DIST], str_to_num(value))
                if (
equal(key"GRAB SET"))
                    
set_pcvar_num(g_eSettings[CVARS_MIN_DIST_SET], str_to_num(value))
                if (
equal(key"RESET BLOCKS ON NEW ROUND"))
                    
set_pcvar_num(g_eSettings[CVARS_RESET_BLOCKS], str_to_num(value))
                if (
equal(key"ONE HIT KILL FOR ZOMBIES"))
                    
set_pcvar_num(g_eSettings[CVARS_ZOMBIE_SUPERCUT], str_to_num(value))
                if (
equal(key"GUNS MENU"))
                    
set_pcvar_num(g_eSettings[CVARS_GUNS_MENU], str_to_num(value))
                if (
equal(key"GRENADES"))
                    
copy(g_eSettings[CVARS_ROUND_NADES], charsmax(g_eSettings[CVARS_ROUND_NADES]), value)
                if (
equal(key"ALLOWED WEAPONS"))
                    
copy(g_eSettings[CVARS_WEAPONS], charsmax(g_eSettings[CVARS_WEAPONS]), value)
            } 
Supremache is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 07-16-2020 , 07:55   Re: ZombieBasebuilder.ini
Reply With Quote #24

What is the point of using an .ini file just to read cvars? Just use a .cfg file with the actual cvars in it and execute it.

You either use an .ini file with settings and store them into variables
or you use a .cfg file with cvars and store them into cvar pointers.

What you're doing right now doesn't make much sense.

some_file.cfg:

Code:
some_cvar "some_value" another_cvar "2" yet_another_cvar "3.6"

.sma:

Code:
public plugin_cfg() {     server_cmd("exec some_file.cfg") }
__________________

Last edited by OciXCrom; 07-16-2020 at 07:56.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-16-2020 , 08:22   Re: ZombieBasebuilder.ini
Reply With Quote #25

Quote:
Originally Posted by OciXCrom View Post
What is the point of using an .ini file just to read cvars? Just use a .cfg file with the actual cvars in it and execute it.

You either use an .ini file with settings and store them into variables
or you use a .cfg file with cvars and store them into cvar pointers.

What you're doing right now doesn't make much sense.

some_file.cfg:

Code:
some_cvar "some_value" another_cvar "2" yet_another_cvar "3.6"

.sma:

Code:
public plugin_cfg() {     server_cmd("exec some_file.cfg") }
I know and i did that but the problem is in basebuilder mod, all of the cvars has relassed to public plugin_precache() so i can't edit them from .cfg file and i tried to move them to public plugin_init() and the mod has disabled so i dont have any idea i need to add them to .ini file
Supremache is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 07-16-2020 , 10:13   Re: ZombieBasebuilder.ini
Reply With Quote #26

How is it possible that you can't execute a config file? You should be able to set the cvars inside of the said file and just execute it, doesn't matter where the actual cvars are registered (_init() or _precache() or whatever else)
Foxa is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-16-2020 , 10:44   Re: ZombieBasebuilder.ini
Reply With Quote #27

Quote:
Originally Posted by Foxa View Post
How is it possible that you can't execute a config file? You should be able to set the cvars inside of the said file and just execute it, doesn't matter where the actual cvars are registered (_init() or _precache() or whatever else)
Then why when i edit cvar from cfg , no thing happing
Those is .cfg file codes
PHP Code:
new const BB_CONFIGS_FILE[] = "ZombieBasebuilder.cfg"

new ConfigsDir[64]
    
get_localinfo("amxx_configsdir"ConfigsDircharsmax(ConfigsDir))
    
format(ConfigsDircharsmax(ConfigsDir), "%s/%s"ConfigsDirBB_CONFIGS_FILE)
    
    if (!
file_exists(ConfigsDir))
    {
        
server_print("Zombie BaseBuilder file [%s] doesn't exists!"ConfigsDir)
        return;
    }
    
server_cmd("exec ^"%s^""ConfigsDir
Dose there's any wrong in thsoe codes and if you dont trust me, downlaod basebuilder mod 6.5 and add those .cfg codes and try to change the cvar from .cfg file and tell me if you have got the same thing
Supremache is offline
Foxa
Member
Join Date: Nov 2018
Location: Croatia
Old 07-16-2020 , 11:18   Re: ZombieBasebuilder.ini
Reply With Quote #28

Works completely fine for me..
Code:
changelevel "de_dust2"
] bb_buildtime 
"bb_buildtime" is "120"
] bb_buildtime 150
] bb_buildtime 
"bb_buildtime" is "150"
] exec "addons/amxmodx/configs/test.cfg"
] bb_buildtime 
"bb_buildtime" is "120"
] bb_buildtime 150
] bb_buildtime 
"bb_buildtime" is "150"
I've added this at the end of the plugin_precache():
PHP Code:
server_cmd("exec addons/amxmodx/configs/test.cfg"); 
And this is what what i have inside of the "test.cfg"
Code:
bb_buildtime "120"

Last edited by Foxa; 07-16-2020 at 11:20.
Foxa is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-16-2020 , 11:56   Re: ZombieBasebuilder.ini
Reply With Quote #29

Quote:
Originally Posted by Foxa View Post
Works completely fine for me..
Code:
changelevel "de_dust2"
] bb_buildtime 
"bb_buildtime" is "120"
] bb_buildtime 150
] bb_buildtime 
"bb_buildtime" is "150"
] exec "addons/amxmodx/configs/test.cfg"
] bb_buildtime 
"bb_buildtime" is "120"
] bb_buildtime 150
] bb_buildtime 
"bb_buildtime" is "150"
So what dose the problem with me Oo

I've added this at the end of the plugin_precache():
PHP Code:
server_cmd("exec addons/amxmodx/configs/test.cfg"); 
And this is what what i have inside of the "test.cfg"
Code:
bb_buildtime "120"


I already did it but when i check cfg from console, it didn't show me anyproblem and the cvar still not changed
Quote:
;[BaseBuilder Cvars]
bb_enabled "1"
bb_buildtime "100"
bb_preptime "30"
bb_zombie_respawn_delay "3"
bb_infection_respawn = "6"
bb_showmovers "1"
bb_lockblocks "1"
bb_lockmax "10"
bb_colormode "1"
bb_max_move_dist "768"
bb_min_move_dist "32"
bb_min_dist_set "64"
bb_resetblocks "1"
bb_zombie_supercut "0"
bb_gunsmenu "1"
bb_roundnades "h"
bb_weapons "abcdeghijlmnqrstuvwx"
bb_extra_items "1"
bb_starting_ammo_packs "5"
bb_donate_ammo "1"
bb_remove_money "1"

;[BaseBuilder Cvars (HUMAN)]
bb_human_health "100"
bb_human_gravity "1.0"
bb_human_speed "240"
bb_human_ammo_reward "1"
bb_human_damage_reward "500"

;[BaseBuilder Cvars (ZOMBIE)]
bb_zombie_ammo_reward "1"
EDIT: I downloaded the mod from first and added .cfg file codes and it still cvar didn't changed

Last edited by Supremache; 07-16-2020 at 12:29.
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-16-2020 , 17:10   Re: ZombieBasebuilder.ini
Reply With Quote #30

Can someone check basebuilder mod and tell me why i can't change the cvars from .cfg or .ini file ???
Supremache 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 00:11.


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