In the written code below I have this error where I type "give_item(id, "weapon_**")" or "strip_user_weapons(id)" It says
Undefined symbol
My question is why?
PHP Code:
#include <amxmodx>
#include <colorchat>
#include <cstrike>
new const PLUGIN[] = "DaysMenu"
new const VERSION[] = "0.1"
new const AUTHOR[] = "f0rhead"
new const g_Prefix[] = "^4[] Jailbreak Shop:^3"
new g_iCurrentGame;
enum
{
GAME_OFF,
GAME_FREE,
GAME_DODGE
}
new const g_Dodgeball[ ] = "models/DaysMenu/v_dodgeball.mdl";
new const g_Dodgeball2[ ] = "models/DaysMenu/p_dodgeball.mdl";
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /dm", "DaysMenu")
}
public plugin_precache()
{
precache_model(g_Dodgeball);
precache_model(g_Dodgeball2)
}
public DaysMenu(id)
{
if(!is_user_alive(id))
return;
if(get_user_flags(id) & ADMIN_CFG)
{
new menu = menu_create("/ ^n /dDaysMenu ", "menu_handler");
menu_additem(menu, "\wFreeday", "1", 0);
menu_additem(menu, "\wDodgeball^n", "2", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0)
}
else
{
ColorChat(id, GREY, "^%s Only ^4Admins^3 can open this menu.", g_Prefix)
}
}
public menu_handler(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
new data[6], iName[64]
new acces, callback
menu_item_getinfo(menu, item, acces, data,5, iName, 63, callback)
new key = str_to_num(data)
switch(key)
{
case 1: Free(id)
case 2: Dodge(id)
}
return PLUGIN_HANDLED
}
public Free(id)
{
strip_user_weapons(id)
give_item(id)
}
public Dodge(id)
{
g_iCurrentGame = GAME_DODGE
new iPlayers[32]
new iNum
new id
get_players( iPlayers, iNum, "a" )
for( new i = 0; i < iNum; i++ )
{
id = iPlayers[i]
ColorChat(0, GREY, "Dodge is ON")
strip_user_weapons( id )
if (cs_get_user_team(id) == CS_TEAM_CT)
{
give_item(id, "weapon_hegrenade")
cs_set_user_bpammo( id, CSW_HEGRENADE, 200 )
}
else if (cs_get_user_team(id) == CS_TEAM_T)
{
give_item(id, "weapon_hegrenade")
cs_set_user_bpammo( id, CSW_HEGRENADE, 200 )
}
}
}