AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menu options (https://forums.alliedmods.net/showthread.php?t=183115)

erader 04-17-2012 15:18

Menu options
 
Hi!
I have 2 options in a menu and doesn't work properly:

Code:

      case 6:   
        {   
            set_user_health( id, 10000 ); 
            set_user_gravity( id, 0.5);   
            give_item(id, "weapon_mp5navy");   
            cs_set_user_bpammo(id, CSW_MP5NAVY, 150);   
            for ( new i = 1; i <= g_maxplayers; i++ )   
            {   
                if ( is_user_alive( id ) && cs_get_user_team( id) == CS_TEAM_CT) 
                {   
                    set_user_health( id, 50 );   
                    set_user_noclip(id, 1); 
                }   
            }   

  } 
 
 case 7:   
        {   
            set_user_health( id, 150 );   
            give_item(id, "weapon_m249");   
            cs_set_user_bpammo(id, CSW_M249, 999);   
            for ( new i = 1; i <= g_maxplayers; i++ )   
            {   
                if ( is_user_alive( id ) && cs_get_user_team( id) == CS_TEAM_CT) 
                {   
                  set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0);     
                }   
            }

In the first, CTs don't have NOCLIP if the option is choosen and in the second the CTs aren't invisible if the option is choosen.What is wrong ?
And how can I make those items (invisibility and NOCLIP) to remain at every spawn till the round ends.

Exolent[jNr] 04-17-2012 15:24

Re: Menu options
 
Code:

            for ( new i = 1; i <= g_maxplayers; i++ )   
            {   
                if ( is_user_alive( id ) && cs_get_user_team( id) == CS_TEAM_CT) 
                {   
                    set_user_health( id, 50 );   
                    set_user_noclip(id, 1); 
                }   
            }

Hmm....

erader 04-17-2012 16:26

Re: Menu options
 
How should it be ?

EpicMonkey 04-17-2012 16:33

Re: Menu options
 
he just showed you your problem ...

erader 04-17-2012 16:35

Re: Menu options
 
But don't understand.

Exolent[jNr] 04-17-2012 16:58

Re: Menu options
 
Then you don't even know what you are doing with your code if you don't see the problem.

erader 04-17-2012 17:49

Re: Menu options
 
Now I solved, thanks.

One more question: how can I make invisibility to remain at every spawn till the round ends.

bazhenov93 04-17-2012 18:15

Re: Menu options
 
Invis of what? Menu or Player?

erader 04-17-2012 18:30

Re: Menu options
 
Quote:

Originally Posted by bazhenov93 (Post 1691308)
Invis of what? Menu or Player?

Invisibility of the player.

fysiks 04-18-2012 04:08

Re: Menu options
 
Hook spawn. If they are still supposed to be invisible then make them invisible again.


All times are GMT -4. The time now is 07:43.

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