Thread: [Solved] C4 back model not showing
View Single Post
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