[ HELP ] Make .ini or .cfg file to plugin?

C

CrazY.

Guest
#1
How to make basic .ini or .cfg to configure the weapons?
This is the code:
Code:

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


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

"weapon_xm1014" // XM1014
"weapon_mac10" // MAC10
"weapon_aug" // AUG
"weapon_ump45" // UMP45
"weapon_sg550" // SG550
"weapon_gali" // GALIL
"weapon_famas" // FAMAS
"weapon_mp5navy" // MP5
"weapon_m249" // M249
"weapon_m3" // M3
"weapon_m4a1" // M4A1
"weapon_tmp" // TMP
"weapon_g3sg1" // G3SG1
"weapon_sg552" // SG552
"weapon_ak47" // AK47
"weapon_p90" // P90

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


new cvar_botquota, g_hamczbots;
new bot_weapons[][] =
{
"weapon_m4a1",
"weapon_sg552",
"weapon_ak47"
}

public plugin_init()
{
register_plugin("[ZP] CS/CZ Bot Weapons", "1.0", "CrazY");
cvar_botquota = get_cvar_pointer("bot_quota");
}

public client_putinserver(id)
{

if (is_user_bot(id) && !g_hamczbots && cvar_botquota)
set_task(0.1, "register_ham_czbots", id);
}

public register_ham_czbots(id)
{

if (g_hamczbots || !is_user_bot(id) || !get_pcvar_num(cvar_botquota))
return;

RegisterHamFromEntity(Ham_Spawn, id, "fw_HamBotSpawn_Post", 1);

g_hamczbots = true;
}

public fw_HamBotSpawn_Post(id)
{

new size_bot_weapons = random(sizeof bot_weapons);
give_item(id, bot_weapons[size_bot_weapons]);
cs_set_user_bpammo(id, get_weaponid(bot_weapons[size_bot_weapons]), 90);
}

public zp_user_humanized_post(id)
{

if(is_user_bot(id) && !zp_get_user_survivor(id) && !zp_get_user_sniper(id))
{
new size_bot_weapons = random(sizeof bot_weapons);
give_item(id, bot_weapons[size_bot_weapons]);
cs_set_user_bpammo(id, get_weaponid(bot_weapons[size_bot_weapons]), 90);
}
}
 
   
   
   
Top