I made my first plugin, but I don't know if it works, because I can't compile it. It shows that weapon_m249 is undefined symbol, can you guys help me?
PS. Is my plugin correct? Or I did something wrong?
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <ammopacks>
#include <fun>
new Price
public plugin_init()
{
register_plugin("BB Machinegun", "1.0", "KviZ")
register_concmd("say /mg", "Buy_Machinegun");
Price = register_cvar("BB_Machinegun_Price", "20")
}
public Buy_Machinegun(id)
{
if (!is_user_alive(id))
return;
new Get_AP = BB_get_user_ap(id)
if(Get_AP >= get_pcvar_num(Price))
{
BB_set_user_ap(id, Get_AP - get_pcvar_num(Price))
give_item(id, weapon_m249)
}
else
{
client_print(id, print_chat,"Neuztenka Ammo paketu | Not enough ammo packets")
}
}
EDIT: I looked at other plugins and I fixed my problem, I didn't put ("") on the weapon_m249. And how can I make my weapon get 9999 ammo?