Raised This Month: $ Target: $400
 0% 

Whats wrong wit this plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
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
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-06-2009 , 05:59   Re: Whats wrong wit this plugin?
Reply With Quote #2

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])
 } 
check your sounds settings

http://forums.alliedmods.net/showpos...8&postcount=18
Attached Files
File Type: sma Get Plugin or Get Source (lol.sma - 597 views - 4.4 KB)
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-06-2009 , 06:43   Re: Whats wrong wit this plugin?
Reply With Quote #3

That really compiles.. holy shit.

deadlyclaws: If you want a more efficient and clean version, PM me.
BOYSplayCS is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 03-06-2009 , 06:45   Re: Whats wrong wit this plugin?
Reply With Quote #4

Quote:
Originally Posted by BOYSplayCS View Post
That really compiles.. holy shit.

deadlyclaws: If you want a more efficient and clean version, PM me.

what do u mean with "that really compiles.. holy shit." ? u mean ma code or him? or u never thinked that i can find the problem?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-06-2009 , 06:55   Re: Whats wrong wit this plugin?
Reply With Quote #5

No, I had faith, I was talking about the original code, it made my eyes bleed.
BOYSplayCS is offline
deadlyclaws
Junior Member
Join Date: Jan 2009
Old 03-06-2009 , 11:41   Re: Whats wrong with this plugin?
Reply With Quote #6

[quote=One;775020]
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])
 } 
check your sounds settings

http://forums.alliedmods.net/showpos...=18[/quote]

*ermm after it plays the Monster kill sound , it doesnt plays anymore sound anymore. *

Btw , I found this plugin at http://forums.alliedmods.net/showthread.php?t=73813 by hleV and I tried to change it to my liking . this are my sound that i used and my sma file im currently using . +karma if you helped !
Attached Files
File Type: sma Get Plugin or Get Source (utsounds.sma - 546 views - 4.2 KB)
File Type: rar ut.rar (1.01 MB, 68 views)
deadlyclaws is offline
Old 03-06-2009, 11:41
deadlyclaws
This message has been deleted by deadlyclaws.
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 16:59.


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