Raised This Month: $ Target: $400
 0% 

warning 217: loose indentation


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
popeye10
Senior Member
Join Date: May 2014
Location: Navi Mumbai (India)
Old 12-17-2014 , 03:25   Re: warning 217: loose indentation
Reply With Quote #4

Try this
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "knifeitup"
#define VERSION "3.0"
#define AUTHOR "Gullu Bhai"

new php ,ahpfrags

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("knifeitup_hp""25")
    
register_cvar("knifeitup_adminhp""100")
    
register_cvar("knifeitup_frags""5")
    
register_event("DeathMsg""Event_DeathMsg_knife""a")
}

new 
CustomSound[][] =  
{
    
"misc/knife1.wav",
    
"misc/knife2.wav",
    
"misc/knife3.wav",
    
"misc/knife4.wav",
    
"misc/knife5.wav"
}

public 
plugin_precache() 

    for ( new 
isizeof CustomSoundi++ ) 
        { 
            
precache_soundCustomSound]); 
        } 
}  


public 
Event_DeathMsg_knife()
{
    new 
Killer read_data(1)
    new 
Victim read_data(2)
    
    if (!
is_user_alive(Killer) || (Killer == Victim))
    return 
PLUGIN_HANDLED;
        
    new 
CheckWeapon[6]
    
read_data(4CheckWeaponcharsmax(CheckWeapon))
    
    if (
equal(CheckWeapon"knife"))
    {
        new 
szName[32], szName2[32]
        
get_user_name(KillerszNamecharsmax(szName))
        
get_user_name(VictimszName2charsmax(szName2))
        
        if(
get_user_flags(Killer) & ADMIN_KICK)
        {
            
client_print_color(0print_chat"!g%s !tGot !g%d !tFrags !g%d !thp For Knifing Admin !g%s"szNamefragsahpszName2);
            
client_cmd0"spk %s",CustomSoundrandom_num0sizeof CustomSound ) ] );//by Arkshine 
            
set_user_health(Killerget_user_health(Killer) + get_pcvar_num(ahp))
            
set_user_frags(Killerget_user_frags(Killer) + get_pcvar_num(frags))
        }
        else
        {
            
client_print_color(0print_chat"!g%s !tGot !g%d !tFrags !g%d !thp For Knifing !g%s"szNamefragsphpszName2);
            
client_cmd0"spk %s",CustomSoundrandom_num0sizeof CustomSound ) ] );//by Arkshine 
            
set_user_health(Killerget_user_health(Killer) + get_pcvar_num(php))
            
set_user_frags(Killerget_user_frags(Killer) + get_pcvar_num(frags))
        }
    }
    return 
PLUGIN_CONTINUE;
}

stock client_print_color(idtype, const text[], any:...)
{
 if(
type == print_chat)
 {
  new 
g_iMsgidSayText;
  
g_iMsgidSayText get_user_msgid("SayText");

  new 
szMsg[191], iPlayers[32], iCount 1;
  
vformat(szMsgcharsmax(szMsg), text3);

  
replace_all(szMsgcharsmax(szMsg), "!g","^x04");
  
replace_all(szMsgcharsmax(szMsg), "!n","^x01");
  
replace_all(szMsgcharsmax(szMsg), "!t","^x03");

  if(
id)
   
iPlayers[0] = id;
  else
   
get_players(iPlayersiCount"ch");

  for(new 
iCount i++)
  {
   if(!
is_user_connected(iPlayers[i]))
    continue;
   
   
message_begin(MSG_ONE_UNRELIABLEg_iMsgidSayText_iPlayers[i]);
   
write_byte(iPlayers[i]);
   
write_string(szMsg);
   
message_end();
  }
 }

__________________
popeye10 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 15:17.


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