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

Solved ZombieBasebuilder.ini


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 07-11-2020 , 17:17   ZombieBasebuilder.ini
Reply With Quote #1

Hello guys,
I making zombie base builder configuration setting file and i have stopped in some codes.
I stopped in section mod cvars, i want to add all mode cvars to .ini file because all cvars are released on public plugin precache() and if i moved them to public plugin_init() the mod will disable.

Base Builder Cvars
PHP Code:
g_pcvar_buildtime register_cvar("bb_buildtime""150"//Build Time
    
g_iBuildTime clamp(get_pcvar_num(g_pcvar_buildtime), 30300)
    
g_pcvar_preptime register_cvar("bb_preptime""30"//Prep Time
    
g_iPrepTime clamp(get_pcvar_num(g_pcvar_preptime), 060)
    
g_pcvar_zombietime register_cvar("bb_zombie_respawn_delay""3"//Zombie Respawn Delay
    
g_iZombieTime clamp(get_pcvar_num(g_pcvar_zombietime), 130)
    
g_pcvar_infecttime register_cvar("bb_infection_respawn""5"//Survivor Respawn Infection Delay
    
g_iInfectTime clamp(get_pcvar_num(g_pcvar_infecttime), 030)
    
g_pcvar_showmovers register_cvar("bb_showmovers""1"//Show Movers
    
g_iShowMovers clamp(get_pcvar_num(g_pcvar_showmovers), 01)
    
g_pcvar_lockblocks register_cvar("bb_lockblocks""1"//Lock blocks
    
g_iLockBlocks clamp(get_pcvar_num(g_pcvar_lockblocks), 01)
    
g_pcvar_lockmax register_cvar("bb_lockmax""10"//Lock max
    
g_iLockMax clamp(get_pcvar_num(g_pcvar_lockmax), 050)
    
g_pcvar_colormode register_cvar("bb_colormode""1"//Color mode <0/1/2> Menu, one color per player, random
    
g_iColorMode clamp(get_pcvar_num(g_pcvar_colormode), 02)
    
g_pcvar_entmaxdist register_cvar("bb_max_move_dist""768"//Push ceiling
    
g_fEntMaxDist get_pcvar_float(g_pcvar_entmaxdist)
    
g_pcvar_entmindist register_cvar("bb_min_move_dist""32"//Pull floor
    
g_fEntMinDist get_pcvar_float(g_pcvar_entmindist)
    
g_pcvar_entsetdist register_cvar("bb_min_dist_set""64"//Grab set
    
g_fEntSetDist get_pcvar_float(g_pcvar_entsetdist)
    
g_pcvar_resetent register_cvar("bb_resetblocks""1"//Reset blocks on new round
    
g_iResetEnt clamp(get_pcvar_num(g_pcvar_resetent), 01)
    
g_pcvar_supercut register_cvar("bb_zombie_supercut""0"//One hit kill for zombies
    
g_iSupercut clamp(get_pcvar_num(g_pcvar_supercut), 01)
    
g_pcvar_gunsmenu register_cvar("bb_gunsmenu""1"//Use the internal guns menu
    
g_iGunsMenu clamp(get_pcvar_num(g_pcvar_gunsmenu), 01)
    
    
g_pcvar_givenades register_cvar("bb_roundnades","h"//Grenades
    
g_pcvar_allowedweps register_cvar("bb_weapons","abcdeghijlmnqrstuvwx"

I did it but when i open the game to test it the game get automaticly closed so i think there's a problem in those codes

PHP Code:
case SECTION_MOD_CVARS:
            {
                if (
equal(key"MOD ENABLE/DISABLE"))
                    
g_pcvar_enabled str_to_num(value)
                if (
equal(key"BUILD TIME"))
                    
g_pcvar_buildtime str_to_num(value)
                if (
equal(key"PREP TIME"))
                    
g_pcvar_preptime str_to_num(value)
                if (
equal(key"ZOMBIE RESPAWN DELAY"))
                    
g_pcvar_zombietime str_to_num(value)
                if (
equal(key"SURVIVOR RESPAWN INFECTION DELAY"))
                    
g_pcvar_infecttime str_to_num(value)
                if (
equal(key"SHOW MOVERS"))
                    
g_pcvar_showmovers str_to_num(value)
                if (
equal(key"LOCK BLOCKS"))
                    
g_pcvar_lockblocks str_to_num(value)
                if (
equal(key"LOCK MAX"))
                    
g_pcvar_lockmax str_to_num(value)
                if (
equal(key"COLOR MOD <0/1/2>"))
                    
g_pcvar_colormode str_to_num(value)
                if (
equal(key"PUSH CEILING"))
                    
g_pcvar_entmaxdist str_to_num(value)
                if (
equal(key"PULL FLOOR"))
                    
g_pcvar_entmindist str_to_num(value)
                if (
equal(key"GRAB SET"))
                    
g_pcvar_entsetdist str_to_num(value)
                if (
equal(key"RESET BLOCKS ON NEW ROUND"))
                    
g_pcvar_resetent str_to_num(value)
                if (
equal(key"ONE HIT KILL FOR ZOMBIES"))
                    
g_pcvar_supercut str_to_num(value)
                if (
equal(key"GUNS MENU"))
                    
g_pcvar_gunsmenu str_to_num(value)
                if (
equal(key"GRENADES"))
                    
g_pcvar_givenades str_to_num(value)
                if (
equal(key"ALLOWED WEAPONS"))
                    
g_pcvar_allowedweps str_to_num(value)        
            } 
Where's the problem in those codes or all of that are wrong?

Last edited by Supremache; 07-26-2020 at 18:44.
Supremache is offline
 



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:21.


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