Raised This Month: $ Target: $400
 0% 

Many erroes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-12-2014 , 07:41   Re: Many erroes
Reply With Quote #1

indraraj when i knife no name is showing neither victim nor killer and sounds not playing or downloading i wnat that sound must play each time different and i have added green chat script its not working in this
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>

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


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 
knifesounds[5][] =
{
    
"sound/knifesound/knife1",
    
"sound/knifesound/knife2",
    
"sound/knifesound/knife3",
    
"sound/knifesound/knife4",
    
"sound/knifesound/knife5"
}

public 
Event_DeathMsg_knife()
{
    new 
Killer read_data(1)
    new 
Victim read_data(2)
    
    if (!
is_user_alive(Killer) || (Killer == Victim))
    return;
    
    new 
CheckWeapon[6];
    
read_data(4CheckWeapon5);
    
    if (
equal(CheckWeapon"knife"))
    {
        new 
php get_cvar_num("knifeitup_hp")
        new 
ahp get_cvar_num("knifeitup_adminhp")
        new 
frags get_cvar_num("knifeitup_frags")
        

        if(
get_user_flags(Killer) & ADMIN_KICK
        {
            
client_print(0print_chat"!g %s !tGot !g %s !tFrags !g %s !t hp For Knifing !gAdmin %s"KillerfragsahpVictim)
            
client_cmd(0"spk %s"knifesounds)
            
set_user_health(Killerget_user_health(Killer) + ahp)
            
set_user_frags(Killerget_user_frags(Killer) + frags)
        }
       else
        {
        
client_print(0print_chat"!g %s !t Got !g %s !tFrags !g %s hp !tFor Knifing !g %s"KillerfragsphpVictim)
        
client_cmd(0"spk %s"knifesounds)
        
set_user_health(Killerget_user_health(Killer) + php)
        
set_user_frags(Killerget_user_frags(Killer) + frags)
       }
    } 
}  


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();
  }
 }

tousif is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 12-12-2014 , 08:27   Re: Many erroes
Reply With Quote #2

#tousif check this one

https://forums.alliedmods.net/showth...=245522&page=2
same as yours
__________________
Thanks everyone. #miss_you_all

Last edited by indraraj striker; 12-12-2014 at 08:49.
indraraj striker is offline
Reply



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:22.


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