Raised This Month: $ Target: $400
 0% 

Strip User Weapons Last CT


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Monster Truck
Member
Join Date: Jan 2012
Location: France
Old 07-24-2014 , 22:37   Strip User Weapons Last CT
Reply With Quote #1

Hi, i tried to make a little plugin that strips terros weapons (primary, secondary, c4) when only 1 CT remains, but it didn't work.

- The Link to the stock i Used : Strip Primary weapon, secondary, grenades.

- This Code i made :
PHP Code:
#include < amxmodx >
#include < cstrike >
#include < stripweapons >

#define VERSION "1.2"
#define MAX_PLAYERS 32

public plugin_init( )

    
register_plugin"Strip Weapons Last CT"VERSION"Imag!ne" )

    
register_event"DeathMsg""Event_DeathMsg""a" );
}

public 
Event_DeathMsgid )
{
    new 
iPlayersCtMAX_PLAYERS ], iNumCt;
    
get_playersiPlayersCtiNumCt"ae""CT" ) ;
    
    if( 
iNumCt == )
    {
        
StripTerrosWeaponsid );
    }
}

public 
StripTerrosWeaponsid )
{
    if( 
is_user_aliveid ) && cs_get_user_teamid ) == CS_TEAM_T )
    {
        
StripWeaponsidPrimary );
        
StripWeaponsidSecondary );
        
StripWeaponsidC4 );
    }

- And The Notable error i got :
Code:
L 07/24/2014 - 19:02:58: [CSTRIKE] Player out of range (0)
Actually, I think the error is that the condition i made will check for a player that is the last CT and Terrorist together, but i really don't know how to do it otherwise.

If someone has the time to help me, i'll be really gratefull.

Last edited by Monster Truck; 07-25-2014 at 15:37.
Monster Truck 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 13:05.


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