AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   cfg in plugin (https://forums.alliedmods.net/showthread.php?t=55266)

flye 05-18-2007 00:13

cfg in plugin
 
i want to learn how to use a cfg in a plugin like
"omg.cfg" will be loded with cvars that i can change.

how do i do this?

_Master_ 05-18-2007 04:41

Re: cfg in plugin
 
PHP Code:

public plugin_cfg(){
    new 
cfgdir[512]

    
get_configsdir(cfgdir511)
    
add(cfgdir511"/omg.cfg")

    if(
file_exists(cfgdir)) server_cmd("exec %s"cfgdir)
    
    
//
    //    ADD EXTRA CONFIG CODE HERE
    //


Config file should be placed in moddir/addons/amxmodx/configs/


All times are GMT -4. The time now is 10:41.

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