Raised This Month: $32 Target: $400
 8% 

Giving grenades problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 08-30-2014 , 19:00   Giving grenades problem
Reply With Quote #1

I ahve a problem in my JailBreak server... When last terrorist choose grenade challenge in last request, counter-terrorist doesn't get any grenades...

Here's the code:
PHP Code:
public submenu(idmenuitem)
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], iName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,5iName63callback);
    
    new 
tempid str_to_num(data);
    
    new 
mapname[33]
    
get_mapname(mapname32)
    
    
block_buttons true
    g_bPickupWeapon 
true
    g_bDropWeapon 
true
    Push_Button
()
    
    new 
ct_origin[3], te_origin[3]
    
    switch(
lrgame[id])
    {

///////////////////////

case LR_NADE:
{                
    
strip_user_weapons(tempid);
    
give_item(tempid"weapon_hegrenade");
    
cs_set_user_bpammo(tempidCSW_HEGRENADE50);
            
    
strip_user_weapons(id);
    
set_user_health(id100);
    
give_item(id"weapon_hegrenade");
    
cs_set_user_bpammo(idCSW_HEGRENADE50);
            
    if(
is_user_alive(tempid))
        
set_user_health(tempid100);
                
    new 
szName[32], szName2[32]
    
get_user_name(idszName31)
    
get_user_name(tempidszName231)
            
    
client_print(0print_center"%s vs %s^n He dvikova",szNameszName2)
                
        
    if(
get_pcvar_num(cvar_teleport) && equali(mapname,"some1s_jailbreak"))
    {
        
ct_origin[0] = -2898ct_origin[1] = -2040ct_origin[2] = 37
        te_origin
[0] = -2908te_origin[1] = 905te_origin[2] = 37
        set_user_origin
(id,te_origin)
        
set_user_origin(tempid,ct_origin)
    }
    
set_task(0.1"beacon"id)
    
set_task(0.1"beacon"tempid)

Unkolix is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 08-30-2014 , 19:13   Re: Giving grenades problem
Reply With Quote #2

If tempid is actually valid ID, the problem might be caused from another plugin or another part of that code. Can't see anything wrong here.
__________________

Last edited by Flick3rR; 08-30-2014 at 19:13.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Unkolix
Veteran Member
Join Date: Sep 2012
Old 08-31-2014 , 04:50   Re: Giving grenades problem
Reply With Quote #3

Quote:
Originally Posted by Flick3rR View Post
If tempid is actually valid ID, the problem might be caused from another plugin or another part of that code. Can't see anything wrong here.
The problem is, that the code is good and the ID is valid. It strips weapons for CT, gives 100 HP... But doesn't give grenades...

P.S. Works great with other duels.. Scout, knife, Shot for Shot, Deagle...

EDIT: Thanks, I just found that jbextreme plugin blocks grenades for CT...

Last edited by Unkolix; 08-31-2014 at 05:18.
Unkolix is offline
Reply



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 23:59.


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