Raised This Month: $ Target: $400
 0% 

Whats wrong wit this plugin?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
deadlyclaws
Junior Member
Join Date: Jan 2009
Old 03-06-2009 , 05:48   Whats wrong wit this plugin?
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <amxmisc>
#define VERSION "1.0"
new g_Play[33], g_FirstBloodg_MultiKills[33], g_Spree[33]
new 
g_MultiKillLvls[3] = {234}
new 
g_SpreeLvls[10] = {345678101112}
new 
g_MultiKillMsgs[3][] = 
{
 
"UT_DOUBLEKILL",
 
"UT_MULTIKILL",
 
"UT_ULTRAKILL",
}
new 
g_SpreeMsgs[10][] = 
{
 
"UT_KILLINGSPREE",
 
"UT_DOMINATING",
 
"UT_MEGAKILL",
        
"UT_UNSTOPPABLE",
 
"UT_WICKEDSICK"
 "UT_MONSTERKILL"
,
 
"UT_GODLIKE",
 
"UT_HOLYSHIT",
        
"UT_RAMPAGE",
 
"UT_LUDICROUS"
}
new 
g_MultiKillSnds[3][] = 
{
 
"misc/ut/doublekill.wav",
 
"misc/ut/multikill.wav",
 
"misc/ut/ultrakill.wav"
}
new 
g_SpreeSnds[10][] = 
{
 
"misc/ut/killingspree.wav",
 
"misc/ut/dominating.wav",
 
"misc/ut/megakill.wav",
 
"misc/ut/unstoppable.wav",
 
"misc/ut/wickedsick.wav",
 
"misc/ut/1monsterkill.wav",
 
"misc/ut/godlike.wav",
 
"misc/ut/1holyshit.wav"
 "misc/ut/rampage.wav"
,
 
"misc/ut/ludicrouskill.wav"
}
new 
ut_soundsut_playut_headshotut_firstbloodut_multikillut_spree
public plugin_init() 
{
 
register_plugin("Unreal Tournament Sounds"VERSION"hleV")
 
register_dictionary("utsounds.txt")
 
register_clcmd("say /utsounds""cmdInfo")
 
ut_sounds register_cvar("ut_sounds"VERSIONFCVAR_SPONLY|FCVAR_SERVER)
 
ut_play register_cvar("ut_play""1")
 
ut_headshot register_cvar("ut_headshot""1")
 
ut_firstblood register_cvar("ut_firstblood""1")
 
ut_multikill register_cvar("ut_multikill""0")
 
ut_spree register_cvar("ut_spree""1")
 
register_event("ResetHUD""playerSpawn""be")
 
register_event("DeathMsg""playerDeath""a""1>0")
 
g_FirstBlood 1
}
public 
cmdInfo(id)
 
client_print(idprint_chat"UtSounds"VERSION)
public 
client_connect(id
{
 
g_Play[id] = 1
 g_MultiKills
[id] = 0
 g_Spree
[id] = 0
}
public 
playerSpawn(id
{
 if (
get_pcvar_num(ut_play) && g_Play[id] && is_user_alive(id)) 
 {
  
client_cmd(id"speak misc/ut/play")
  
g_Play[id] = 0
 
}
}
public 
playerDeath() 
{
 new 
killer read_data(1)
 new 
victim read_data(2)
 if (!
get_pcvar_num(ut_sounds) || killer == victim)
  return 
PLUGIN_HANDLED
 
new headshotkillerName[32]
 
read_data(3headshot)
 
get_user_name(killerkillerName31)
 if (
get_pcvar_num(ut_headshot) && headshot
 {
  if (
g_MultiKills[killer] <= 0)
  {
   
set_hudmessage(25500, -1.00.2506.01.50.10.2, -1)
   
show_hudmessage(killer"%L"LANG_SERVER"UT_HEADSHOT")
  }
  
client_cmd(killer"speak misc/ut/headshot")
 }
 if (
get_pcvar_num(ut_firstblood) && g_FirstBlood
 {
  
set_hudmessage(25500, -1.00.7506.05.00.10.2, -1)
  
show_hudmessage(0"%L"LANG_SERVER"UT_FIRSTBLOOD"killerName)
  
client_cmd(killer"speak misc/ut/1firstblood")
  
g_FirstBlood 0
 
}
 if (
get_pcvar_num(ut_multikill))
 {
  
g_MultiKills[killer] += 1
  remove_task
(killer)
  
set_task(5.0"stopMultiKills"killer)
  for (new 
07i++)
  {
   
set_hudmessage(25500, -1.00.2506.01.50.10.2, -1)
   if (
g_MultiKills[killer] == g_MultiKillLvls[i])
   {
    
show_hudmessage(killer"%L"LANG_SERVERg_MultiKillMsgs[i])
    
client_cmd(killer"speak %s"g_MultiKillSnds[i])
   }
   else if (
g_MultiKills[killer] >= 9)
   {
    
show_hudmessage(killer"%L"LANG_SERVER"UT_LUDICROUS")
    
client_cmd(killer"speak misc/ut/ludicrouskill")
   }
  }
 }
 if (
get_pcvar_num(ut_spree))
 {
  new 
victimName[32]
  
get_user_name(victimvictimName31)
  
g_Spree[killer] += 1
  
for (new i6i++)
  {
   
set_hudmessage(00255, -1.00.7506.05.00.10.2, -1)
   if (
g_Spree[killer] == g_SpreeLvls[i])
   {
    
show_hudmessage(killer"%L"LANG_SERVERg_SpreeMsgs[i])
    
client_cmd(killer"speak %s"g_SpreeSnds[i])
   }
   if (
g_Spree[victim] >= g_SpreeLvls[i])
    
show_hudmessage(0"%L"LANG_SERVER"UT_SPREEENDED"victimNamekillerName)
  }
  
g_Spree[victim] = 0
 
}
 return 
PLUGIN_CONTINUE
}
public 
stopMultiKills(id)
 
g_MultiKills[id] = 0
public plugin_precache() 
{
 
precache_sound("misc/ut/play.wav")
 
precache_sound("misc/ut/headshot.wav")
 
precache_sound("misc/ut/1firstblood.wav")
 for (new 
i7i++)
  
precache_sound(g_MultiKillSnds[i])
 for (new 
i6i++)
  
precache_sound(g_SpreeSnds[i])


i compiled and installed that plugin without any problems , but when im in game , i cant hear the sounds , but i can see the HUD msg , i asked my players in my server , they said they cannot hear it too .

i know I'm a noob , but please , i really need help on this plugin, whats wrong wit the code?
deadlyclaws 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 16:59.


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