Raised This Month: $ Target: $400
 0% 

BP Ammo Error + Player out of range


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 03-17-2009 , 21:04   BP Ammo Error + Player out of range
Reply With Quote #1

Quote:
L 03/17/2009 - 17:05:25: [CSTRIKE] Player out of range (0)
L 03/17/2009 - 17:05:25: [AMXX] Run time error 10 (plugin "raptor_gunmenu.amxx") (native "cs_set_user_bpammo") - debug not enabled!
Code:

PHP Code:
public give_weapons(id)
{
    
fm_strip_user_weapons(id)

    
fm_give_item(id,"weapon_knife")

    new 
weapon[32]
    new 
weapname csw_contant(weapon_picked[0][id]);
    
get_weaponname(weapname,weapon,31);
    
fm_give_item(id,weapon);
    
cs_set_user_bpammo(id,weapname,999);

    new 
weapname2 csw_contant(weapon_picked[1][id]);
    
get_weaponname(weapname2,weapon,31);
    
fm_give_item(id,weapon);
    
cs_set_user_bpammo(id,weapname2,999); 
I am not positive of how to fix this glitch It's part of the weapons menu for my raptor mod.
fang is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-17-2009 , 21:24   Re: BP Ammo Error + Player out of range
Reply With Quote #2

Hi.

Id passed from give_weapons() seems to be '0'. I don't know your whole code, but to fix just this function, just add a check :

Code:
if ( is_user_alive( id ) ) 
{

}
But considering your whole code, it may more appropriate to fix it in another function.
Arkshine is offline
fang
Senior Member
Join Date: Nov 2007
Location: New Jersey
Old 03-17-2009 , 21:28   Re: BP Ammo Error + Player out of range
Reply With Quote #3

.... D: I can't believe I never tried that out of the week I spent trying to fix this.

Tyvm arkshine.
(I'd x2 karma if I could but it refuses to let me )
fang is offline
Reply


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 09:02.


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