Raised This Month: $ Target: $400
 0% 

Remove ammo problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
xcalibar
Junior Member
Join Date: Apr 2006
Old 04-09-2006 , 15:19   Remove ammo problem
Reply With Quote #1

hi,
i'm kind of new to all of this and id really like to learn from the experts,

heres my problem, i'm trying to write a simple plugin that will remove the ammo of a user but for some reason it doesn't remove the ammo and gives a run time error,

i know you can just drop the weapon but i dont want them to drop the weapon just have no ammo

heres my code (appologies if the code is badly done ),


Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #include <cstrike> #define PLUGIN "Test rip ammo" #define VERSION "1.0" #define AUTHOR "TEST" #define free 10 public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     set_task(float(free),"steal_ammo",_,_,_,"b") } public steal_ammo(id){ if(id == 0) return cs_set_weapon_ammo(id,0) new clip, ammo, wid = get_user_weapon(id, clip,ammo) cs_set_user_bpammo(id,cs_get_weapon_id (wid),0) set_hudmessage(255, 255, 255, 0.11, 0.31, 0, 6.0, 12.0) show_hudmessage(id, "Oh no! The grim reaper has killed all your ammo ;P") }

amx returns the error


Code:
[AMXX] Run time error 10 (plugin "test.amxx") - debug not enabled!
if i add the word debug after the plugin in the plugins.ini file i recieve the same message debug not enabled?


can anyone tell me what i'm doing wrong


thanks in advance

Xcalibar
xcalibar 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 16:38.


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