Raised This Month: $51 Target: $400
 12% 

Solved C4 back model not showing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
mentalproblems
Junior Member
Join Date: Mar 2019
Old 03-10-2019 , 08:48   C4 back model not showing
Reply With Quote #1

Hi.
Well I've created a VIP menu plugin for my personal server and it's working perfectly, except one thing.

After choosing from menu, player who has C4, it doesn't show C4 back model.
If someone knows what's missing here, I'd be grateful to be taught.

PHP Code:
public WpHandler(id, EXIT, item)
{
    if (!
is_user_alive(id))
    return 
PLUGIN_HANDLED
    
    
if(item == MENU_EXIT)
    {
        
menu_destroy(EXIT);
        return 
PLUGIN_HANDLED;
    }
    
    switch(
item)
    {
        case 
0: {
            if (
user_has_weapon(idCSW_C4) && get_user_team(id) == 1)
                
PlayerhasC4[id] = true;
            else
                
PlayerhasC4[id] = false;
            
            
strip_user_weapons(id);
            
give_item(id"weapon_m4a1");
            
cs_set_user_bpammo(idCSW_M4A190);
            
give_item(id"weapon_deagle");
            
cs_set_user_bpammo(idCSW_DEAGLE35);
            
give_item(id"weapon_knife");
            
give_item(id"weapon_hegrenade");
            
give_item(id"weapon_flashbang");
            
give_item(id"item_thighpack");
            
give_item(id"item_assaultsuit");
            
            if (
PlayerhasC4[id])
            {
                
give_item(id"weapon_c4");
                
cs_set_user_plantid );
                
cs_set_user_submodel(id1); //  <--- THIS LINE WAS NEEDED.
            
}
            } 

Last edited by mentalproblems; 03-10-2019 at 14:30. Reason: Shorten the code
mentalproblems is offline
 



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 12:32.


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