Raised This Month: $ Target: $400
 0% 

Include help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
KviZ
Senior Member
Join Date: Feb 2011
Location: Lithuania
Old 04-06-2011 , 09:31   Include help
Reply With Quote #1

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(idGet_AP get_pcvar_num(Price))
        
give_item(idweapon_m249)
    }
    else
    {
        
client_print(idprint_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?

Last edited by KviZ; 04-06-2011 at 09:50.
KviZ is offline
 


Thread Tools
Display Modes

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 19:46.


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