AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved C4 back model not showing (https://forums.alliedmods.net/showthread.php?t=314861)

mentalproblems 03-10-2019 08:48

C4 back model not showing
 
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.
            
}
            } 


thEsp 03-10-2019 09:37

Re: C4 back model not showing
 
PHP Code:

cs_set_user_plant(id,1,1


OciXCrom 03-10-2019 10:55

Re: C4 back model not showing
 
Quote:

Originally Posted by thEsp (Post 2642725)
PHP Code:

cs_set_user_plant(id,1,1


That is the exact same thing as "cs_set_user_plant(id)" which he already has.

thEsp 03-10-2019 11:00

Re: C4 back model not showing
 
Quote:

Originally Posted by OciXCrom (Post 2642734)
That is the exact same thing as "cs_set_user_plant(id)" which he already has.

It works for me tho. In addition, he needs to use cs_set_user_submodel.

mentalproblems 03-10-2019 14:27

Re: C4 back model not showing
 
Solved..
Just added
PHP Code:

cs_set_user_submodel(id1); 

Shqipe ta ha zemren <3


All times are GMT -4. The time now is 15:17.

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