Raised This Month: $ Target: $400
 0% 

[help] correction 2 probleme


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-19-2009 , 13:57   Re: [help] correction 2 probleme
Reply With Quote #2

Try this:

PHP Code:
public player_Spawn(player)
{
    if( 
is_user_alive(player) )
    {
        new 
CsTeams:team cs_get_user_teamplayer )
        switch ( 
team )
        {
            case 
CS_TEAM_T :
            {
                
strip_user_weapons(player)
                
give_item(player"weapon_knife")
                
set_user_maxspeed(player400.0 );    
                
set_user_health(player20000
                
set_user_gravity(player0.5)
                
set_pev(playerpev_viewmodel2"models/tskin/v_knife.mdl" );
              }
              case 
CS_TEAM_CT :
                  
menu_display(playerprimmenu0)
        }
    }



Your ordering is all wrong and I'm surprised you're not getting runtime errors, but it may work anyway.

If you're interested, plugin_cfg() only gets executed once and shortly after plugin_init(). It's not even possible that a user can be connected when plugin_cfg() is called, let alone be a CT and alive when a round starts.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
 



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 17:35.


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