Raised This Month: $ Target: $400
 0% 

get_user_weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 04-22-2012 , 08:43   Re: get_user_weapons
Reply With Quote #6

PHP Code:
const PRIMARY_WEAPONS = ( << CSW_AK47 ) | ( << CSW_M4A1 ) | ( << CSW_FAMAS ) | ( << CSW_GALIL ) | ( << CSW_SCOUT ) | ( << CSW_AWP ) | ( << CSW_M249 ) | ( << CSW_MP5NAVY ) | ( << CSW_P90 ) | ( << CSW_MAC10 ) | ( << CSW_TMP ) | ( << CSW_XM1014 ) | ( << CSW_M3 ) | ( << CSW_G3SG1 ) | ( << CSW_SG550 ) | ( << CSW_SG552 ) | ( << CSW_AUG ) | ( << CSW_UMP45 );

new 
boolg_bHasPrimary33 ];

public 
client_putinserver(id)
  
g_bHasPrimaryid ] = false;

public 
Event_CurWeapon(id)
{
  
// register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1" );

  
g_bHasPrimaryid ] = false;

  static 
iWeapons32 ], iNumiiNum 0;
  
get_user_weaponsidiWeaponsiNum );
  for( 
0iNumi++ )
  {
    if( ( 
<< iWeapons] ) & PRIMARY_WEAPONS )
    {
        
g_bHasPrimaryid ] = true;

        break;
    }
  }
}

public 
Event_DeathMsg() 

    new 
iKiller read_data(1); 
    new 
iVictim read_data(2);
    
    new 
freekill_slay get_pcvar_num(jb_slay_4freekills)
    new 
max_freekills get_pcvar_num(jb_max_freekills);
    new 
szVName[32], szKName[32]; 
    
get_user_name(iVictimszVNamecharsmax(szVName)); 
    
get_user_name(iKillerszKNamecharsmax(szKName));

    
clear_bit(g_bIsAliveiVictim);
    
    if( 
cs_get_user_teamiVictim ) == CS_TEAM_T 
    {  
        if( 
IsPlayeriKiller ) && cs_get_user_teamiKiller ) == CS_TEAM_CT 
        { 
            if( 
g_bRebel[iVictim] ) 
            { 
                
fnColorPrint(0"Guard^4 %s ^1killed rebel^4 %s ^1!"szKNameszVName); 
            }
            else if( !
g_bRebel[iVictim] ) 
            {
                if( 
g_bHasPrimaryiVictim ] ) return PLUGIN_HANDLED;

                
g_iFreekill[iKiller]++
                
                if(
g_iFreekill[iKiller] == 1)
                {
                    
fnColorPrint(iKiller"^3Warning: ^1Freekilling is not allowed. ");
                    
UTIL_ScreenFade(iKiller,{ 25510061 }, 2.02.085);
                }
                if(
g_iFreekill[iKiller] == 2)
                {
                    
UTIL_ScreenFade(iKiller,{ 25510061 }, 2.52.595);
                }
                if(
g_iFreekill[iKiller] == freekill_slay)
                {
                    
fnColorPrint(iKiller"^3Last warning:^1 Every freekill you make form now will result in instant slay");
                    
UTIL_ScreenFade(iKiller,{ 2550}, 2.52.5175);
                }
                if(
g_iFreekill[iKiller] >= max_freekills)
                {
                    
//client_tutor(0, TutorRed, FriendDied, 6.0, "Freekilling is not allowed,^nType rules to see the rules.");
                    
UTIL_ScreenFade(iKiller,{ 2550}, 2.52.5255);
                    
user_kill(iKiller);
                }
            }
        } 
    }
    return 
PLUGIN_HANDLED;

__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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 07:46.


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