AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Miscstats (https://forums.alliedmods.net/showthread.php?t=41462)

{NM}Jason 07-15-2006 20:29

Miscstats
 
Alright after todays bit of screwing around i cant seem to figure out what i'm doing wrong. i have tried to change the files that miscstats uses the fallowing files

sound/misc/dominating2.wav
sound/misc/firstblood2.wav
sound/misc/godlike2.wav
sound/misc/headshot2.wav
sound/misc/holyshit2.wav
sound/misc/humiliation2.wav
sound/misc/killChicken.wav
sound/misc/killingspree2.wav
sound/misc/ludicrouskill2.wav
sound/misc/monsterkill2.wav
sound/misc/multikill2.wav
sound/misc/plane_drone.wav
sound/misc/prepare2.wav
sound/misc/rampage2.wav
sound/misc/sheep.wav
sound/misc/talk.wav
sound/misc/ultrakill2.wav
sound/misc/unstoppable2.wav
sound/misc/wickedsick2.wav

now after enabling the correct options in stats menu nothing is happening heres the code

Code:
#include <amxmodx> #include <csx> public MultiKill public MultiKillSound public BombPlanting public BombDefusing public BombPlanted public BombDefused public BombFailed public BombPickUp public BombDrop public BombCountVoice public BombCountDef public BombReached public ItalyBonusKill public EnemyRemaining public LastMan public KnifeKill public KnifeKillSound public GrenadeKill public GrenadeSuicide public HeadShotKill public HeadShotKillSound public RoundCounterSound public RoundCounter public KillingStreak public KillingStreakSound public DoubleKill public DoubleKillSound public PlayerName public FirstBloodSound new g_streakKills[33][2] new g_multiKills[33][2] new g_C4Timer new g_Defusing new g_Planter new Float:g_LastOmg new g_LastAnnounce new g_roundCount new Float:g_doubleKill new g_doubleKillId new g_friend[33] new g_firstBlood new g_center1_sync new g_announce_sync new g_status_sync new g_left_sync new g_bottom_sync new g_MultiKillMsg[11][] = {     "Multi-Kill! %s^n%L %d %L (%d %L)",     "Ultra-Kill!!! %s^n%L %d %L (%d %L)",     "%s IS ON A KILLING SPREE!!!^n%L %d %L (%d %L)",     "RAMPAGE!!! %s^n%L %d %L (%d hs)",     "%s IS UNSTOPPABLE!!!^n%L %d %L (%d %L)",     "%s IS A MONSTER!^n%L %d %L (%d %L)",     "%s IS THE SHIT!^n%L %d %L (%d %L)",     "%s GOT A LUDICROUS KILL!^n%L %d %L (%d %L)",     "%s IS WICKED SICK!^n%L %d %L (%d %L)",     "%s IS DOMINATING!^n%L %d %L (%d %L)",     "%s IS GODLIKE !!!!^n%L %d %L (%d %L)" } new g_Sounds[11][] = {     "multikill2",     "ultrakill2",     "killingspree2",     "rampage2",     "unstoppable2",     "monsterkill2",     "holyshit2",     "ludicrouskill2",     "wickedsick2",     "dominating2",     "godlike2" } new g_KillingMsg[11][] = {     "%s: Multi-Kill!",     "%s: Ultra-Kill!!!",     "%s: IS ON A KILLING SPREE!!!",     "%s: RAMPAGE!!!",     "%s: IS UNSTOPPABLE!!!",     "%s: IS A MONSTER!",     "%s: IS THE SHIT!",     "%s: GOT A LUDICROUS KILL!",        "%s: IS WICKED SICK!",     "%s: IS DOMINATING!",     "%s: IS GODLIKE!!!" } new g_KinfeMsg[4][] = {     "KNIFE_MSG_1",     "KNIFE_MSG_2",     "KNIFE_MSG_3",     "KNIFE_MSG_4" } new g_LastMessages[4][] = {     "LAST_MSG_1",     "LAST_MSG_2",     "LAST_MSG_3",     "LAST_MSG_4" } new g_HeMessages[4][] = {     "HE_MSG_1",     "HE_MSG_2",     "HE_MSG_3",     "HE_MSG_4" } new g_SHeMessages[4][] = {     "SHE_MSG_1",     "SHE_MSG_2",     "SHE_MSG_3",     "SHE_MSG_4" } new g_HeadShots[7][] = {     "HS_MSG_1",     "HS_MSG_2",     "HS_MSG_3",     "HS_MSG_4",     "HS_MSG_5",     "HS_MSG_6",     "HS_MSG_7" } new g_teamsNames[4][] = {     "TERRORIST",     "CT",     "TERRORISTS",     "CTS" } public plugin_init() {     register_plugin("CS Misc. Stats", AMXX_VERSION_STR, "AMXX Dev Team")     register_dictionary("miscstats.txt")     register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")     register_event("SendAudio", "eEndRound", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")     register_event("RoundTime", "eNewRound", "bc")     register_event("StatusValue", "setTeam", "be", "1=1")     register_event("StatusValue", "showStatus", "be", "1=2", "2!0")     register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")     new mapname[32]     get_mapname(mapname, 31)     if (equali(mapname, "de_", 3) || equali(mapname, "csde_", 5))     {         register_event("StatusIcon", "eGotBomb", "be", "1=1", "1=2", "2=c4")         register_event("TextMsg", "eBombPickUp", "bc", "2&#Got_bomb")         register_event("TextMsg", "eBombDrop", "bc", "2&#Game_bomb_d")     }     else if (equali(mapname, "cs_italy"))     {         register_event("23", "chickenKill", "a", "1=108", /*"12=106", */ "15=4")         register_event("23", "radioKill", "a", "1=108", /*"12=294", */ "15=2")     }         g_center1_sync = CreateHudSyncObj()     g_announce_sync = CreateHudSyncObj()     g_status_sync = CreateHudSyncObj()     g_left_sync = CreateHudSyncObj()     g_bottom_sync = CreateHudSyncObj() } public plugin_cfg() {     new g_addStast[] = "amx_statscfg add ^"%s^" %s"         server_cmd(g_addStast, "MultiKill", "MultiKill")     server_cmd(g_addStast, "MultiKillSound", "MultiKillSound")     server_cmd(g_addStast, "Bomb Planting", "BombPlanting")     server_cmd(g_addStast, "Bomb Defusing", "BombDefusing")     server_cmd(g_addStast, "Bomb Planted", "BombPlanted")     server_cmd(g_addStast, "Bomb Defuse Succ.", "BombDefused")     server_cmd(g_addStast, "Bomb Def. Failure", "BombFailed")     server_cmd(g_addStast, "Bomb PickUp", "BombPickUp")     server_cmd(g_addStast, "Bomb Drop", "BombDrop")     server_cmd(g_addStast, "Bomb Count Down", "BombCountVoice")     server_cmd(g_addStast, "Bomb Count Down (def)", "BombCountDef")     server_cmd(g_addStast, "Bomb Site Reached", "BombReached")     server_cmd(g_addStast, "Italy Bonus Kill", "ItalyBonusKill")     server_cmd(g_addStast, "Last Man", "LastMan")     server_cmd(g_addStast, "Knife Kill", "KnifeKill")     server_cmd(g_addStast, "Knife Kill Sound", "KnifeKillSound")     server_cmd(g_addStast, "Grenade Kill", "GrenadeKill")     server_cmd(g_addStast, "Grenade Suicide", "GrenadeSuicide")     server_cmd(g_addStast, "HeadShot Kill", "HeadShotKill")     server_cmd(g_addStast, "HeadShot Kill Sound", "HeadShotKillSound")     server_cmd(g_addStast, "Round Counter", "RoundCounter")     server_cmd(g_addStast, "Round Counter Sound", "RoundCounterSound")     server_cmd(g_addStast, "Killing Streak", "KillingStreak")     server_cmd(g_addStast, "Killing Streak Sound", "KillingStreakSound")     server_cmd(g_addStast, "Enemy Remaining", "EnemyRemaining")     server_cmd(g_addStast, "Double Kill", "DoubleKill")     server_cmd(g_addStast, "Double Kill Sound", "DoubleKillSound")     server_cmd(g_addStast, "Player Name", "PlayerName")     server_cmd(g_addStast, "First Blood Sound", "FirstBloodSound") } public client_putinserver(id) {     g_multiKills[id] = {0, 0}     g_streakKills[id] = {0, 0} } public client_death(killer, victim, wpnindex, hitplace, TK) {     if (wpnindex == CSW_C4)         return     new headshot = (hitplace == HIT_HEAD) ? 1 : 0     new selfkill = (killer == victim) ? 1 : 0     if (g_firstBlood)     {         g_firstBlood = 0         if (FirstBloodSound)             play_sound("misc/firstblood2")     }     if ((KillingStreak || KillingStreakSound) && !TK)     {         g_streakKills[victim][1]++         g_streakKills[victim][0] = 0         if (!selfkill)         {             g_streakKills[killer][0]++             g_streakKills[killer][1] = 0                         new a = g_streakKills[killer][0] - 3             if ((a > -1) && !(a % 2))             {                 new name[32]                 get_user_name(killer, name, 31)                                 if ((a >>= 1) > 6)                     a = 6                                 if (KillingStreak)                 {                     set_hudmessage(0, 100, 255, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)                     ShowSyncHudMsg(0, g_left_sync, g_KillingMsg[a], name)                 }                                 if (KillingStreakSound)                 {                     new file[32]                                         format(file, 31, "misc/%s", g_Sounds[a])                     play_sound(file)                 }             }         }     }     if (MultiKill || MultiKillSound)     {         if (!selfkill && !TK)         {             g_multiKills[killer][0]++             g_multiKills[killer][1] += headshot                         new param[2]                         param[0] = killer             param[1] = g_multiKills[killer][0]             set_task(4.0 + float(param[1]), "checkKills", 0, param, 2)         }     }     if (EnemyRemaining)     {         new ppl[32], pplnum = 0         new team = get_user_team(victim) - 1                 if (team >= 0 && team < 4)             get_players(ppl, pplnum, "e", g_teamsNames[1 - team])                 if (pplnum)         {             new eppl[32], epplnum                         if (team >= 0 && team < 4)             {                 get_players(eppl, epplnum, "ae", g_teamsNames[team])                 if (epplnum)                 {                     new message[128], team_name[32]                     set_hudmessage(255, 255, 255, 0.02, 0.85, 2, 0.05, 0.1, 0.02, 3.0, -1)                     for (new a = 0; a < pplnum; ++a)                     {                         format(team_name, 31, "%L", ppl[a], (epplnum == 1) ? g_teamsNames[team] : g_teamsNames[team + 2])                         format(message, 127, "%L", ppl[a], "REMAINING", epplnum, team_name)                         ShowSyncHudMsg(ppl[a], g_bottom_sync, "%s", message)                     }                 }             }         }     }     if (LastMan)     {         new cts[32], ts[32], ctsnum, tsnum                 get_players(cts, ctsnum, "ae", g_teamsNames[1])         get_players(ts, tsnum, "ae", g_teamsNames[0])                 if (ctsnum == 1 && tsnum == 1)         {             new ctname[32], tname[32]                         get_user_name(cts[0], ctname, 31)             get_user_name(ts[0], tname, 31)                         set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)             ShowSyncHudMsg(0, g_center1_sync, "%s vs. %s", ctname, tname)                         play_sound("")         }         else if (!g_LastAnnounce)         {             new oposite = 0, team = 0                         if (ctsnum == 1 && tsnum > 1)             {                 g_LastAnnounce = cts[0]                 oposite = tsnum                 team = 0             }             else if (tsnum == 1 && ctsnum > 1)             {                 g_LastAnnounce = ts[0]                 oposite = ctsnum                 team = 1             }             if (g_LastAnnounce)             {                 new name[32]                                 get_user_name(g_LastAnnounce, name, 31)                                 set_hudmessage(0, 255, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)                 ShowSyncHudMsg(0, g_center1_sync, "%s (%d HP) vs. %d %s%s: %L", name, get_user_health(g_LastAnnounce), oposite, g_teamsNames[team], (oposite == 1) ? "" : "S", LANG_PLAYER, g_LastMessages[random_num(0, 3)])                                 if (!is_user_connecting(g_LastAnnounce))                     client_cmd(g_LastAnnounce, "")             }         }     }     if (wpnindex == CSW_KNIFE && (KnifeKill || KnifeKillSound))     {         if (KnifeKill)         {             new killer_name[32], victim_name[32]                         get_user_name(killer, killer_name, 31)             get_user_name(victim, victim_name, 31)                         set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)             show_hudmessage(0, "%L", LANG_PLAYER, g_KinfeMsg[random_num(0, 3)], killer_name, victim_name)         }                 if (KnifeKillSound)             play_sound("misc/humiliation2")     }     if (wpnindex == CSW_HEGRENADE && (GrenadeKill || GrenadeSuicide))     {         new killer_name[32], victim_name[32]                 get_user_name(killer, killer_name, 31)         get_user_name(victim, victim_name, 31)                 set_hudmessage(255, 100, 100, -1.0, 0.25, 1, 6.0, 6.0, 0.5, 0.15, -1)                 if (!selfkill)         {             if (GrenadeKill)                 show_hudmessage(0, "%L", LANG_PLAYER, g_HeMessages[random_num(0, 3)], killer_name, victim_name)         }         else if (GrenadeSuicide)             show_hudmessage(0, "%L", LANG_PLAYER, g_SHeMessages[random_num(0, 3)], victim_name)     }     if (headshot && (HeadShotKill || HeadShotKillSound))     {         if (HeadShotKill && wpnindex)         {             new killer_name[32], victim_name[32], weapon_name[32], message[128], players[32], pnum                         xmod_get_wpnname(wpnindex, weapon_name, 31)             get_user_name(killer, killer_name, 31)             get_user_name(victim, victim_name, 31)             get_players(players, pnum, "c")                         for (new i = 0; i < pnum; i++)             {                 format(message, 127, "%L", players[i], g_HeadShots[random_num(0, 6)])                                 replace(message, 127, "$vn", victim_name)                 replace(message, 127, "$wn", weapon_name)                 replace(message, 127, "$kn", killer_name)                                 set_hudmessage(100, 100, 255, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)                 ShowSyncHudMsg(players[i], g_announce_sync, "%s", message)             }         }                 if (HeadShotKillSound)         {             client_cmd(killer, "spk misc/headshot2")             client_cmd(victim, "spk misc/headshot2")         }     }     if ((DoubleKill || DoubleKillSound) && !selfkill)     {         new Float:nowtime = get_gametime()                 if (g_doubleKill == nowtime && g_doubleKillId == killer)         {             if (DoubleKill)             {                 new name[32]                                 get_user_name(killer, name, 31)                                 set_hudmessage(255, 0, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)                 ShowSyncHudMsg(0, g_center1_sync, "%L", LANG_PLAYER, "DOUBLE_KILL", name)             }                         if (DoubleKillSound)                 play_sound("misc/doublekill2")         }                 g_doubleKill = nowtime         g_doubleKillId = killer     } } public hideStatus(id) {     if (PlayerName)     {         ClearSyncHud(id, g_status_sync)     } } public setTeam(id)     g_friend[id] = read_data(2) public showStatus(id) {     if (PlayerName)     {         new name[32], pid = read_data(2)                 get_user_name(pid, name, 31)         new color1 = 0, color2 = 0                 if (get_user_team(pid) == 1)             color1 = 255         else             color2 = 255                     if (g_friend[id] == 1)  // friend         {             new clip, ammo, wpnid = get_user_weapon(pid, clip, ammo)             new wpnname[32]                         if (wpnid)                 xmod_get_wpnname(wpnid, wpnname, 31)                         set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01)             ShowSyncHudMsg(id, g_status_sync, "%s -- %d HP / %d AP / %s", name, get_user_health(pid), get_user_armor(pid), wpnname)         } else {             set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01)             ShowSyncHudMsg(id, g_status_sync, "%s", name)         }     } } public eNewRound() {     if (read_data(1) == floatround(get_cvar_float("mp_roundtime") * 60.0))     {         g_firstBlood = 1         g_C4Timer = 0         ++g_roundCount                 if (RoundCounter)         {             set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)             ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, "PREPARE_FIGHT", g_roundCount)         }                 if (RoundCounterSound)             play_sound("misc/prepare2")                 if (KillingStreak)         {             new appl[32], ppl, i             get_players(appl, ppl, "ac")                         for (new a = 0; a < ppl; ++a)             {                 i = appl[a]                                 if (g_streakKills[i][0] >= 2)                     client_print(i, print_chat, "* %L", i, "KILLED_ROW", g_streakKills[i][0])                 else if (g_streakKills[i][1] >= 2)                     client_print(i, print_chat, "* %L", i, "DIED_ROUNDS", g_streakKills[i][1])             }         }     } } public eRestart() {     eEndRound()     g_roundCount = 0     g_firstBlood = 1 } public eEndRound() {     g_C4Timer = -2     g_LastOmg = 0.0     remove_task(8038)     g_LastAnnounce = 0 } public checkKills(param[]) {     new id = param[0]     new a = param[1]         if (a == g_multiKills[id][0])     {         a -= 3                 if (a > -1)         {             if (MultiKill)             {                 new name[32]                                 get_user_name(id, name, 31)                 set_hudmessage(255, 0, 100, 0.05, 0.50, 2, 0.02, 6.0, 0.01, 0.1, -1)                                 if (a > 6)                     a = 6                                 ShowSyncHudMsg(0, g_left_sync, g_MultiKillMsg[a], name, LANG_PLAYER, "WITH", g_multiKills[id][0], LANG_PLAYER, "KILLS", g_multiKills[id][1], LANG_PLAYER, "HS")             }                         if (MultiKillSound)             {                 new sound[24]                 format(sound, 23, "misc/%s", g_Sounds[a])                 play_sound(sound)             }         }         g_multiKills[id] = {0, 0}     } } public chickenKill()     if (ItalyBonusKill)         announceEvent(0, "KILLED_CHICKEN") public radioKill() {     if (ItalyBonusKill)         announceEvent(0, "BLEW_RADIO") } announceEvent(id, message[]) {     new name[32]         get_user_name(id, name, 31)     set_hudmessage(255, 100, 50, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, -1)     ShowSyncHudMsg(0, g_announce_sync, "%L", LANG_PLAYER, message, name) } public eBombPickUp(id)     if (BombPickUp)         announceEvent(id, "PICKED_BOMB") public eBombDrop()     if (BombDrop)         announceEvent(g_Planter, "DROPPED_BOMB") public eGotBomb(id) {     g_Planter = id         if (BombReached && read_data(1) == 2 && g_LastOmg < get_gametime())     {         g_LastOmg = get_gametime() + 15.0         announceEvent(g_Planter, "REACHED_TARGET")     } } public bombTimer() {     if (--g_C4Timer > 0)     {         if (BombCountVoice)         {             if (g_C4Timer == 30 || g_C4Timer == 20)             {                 new temp[64]                                 num_to_word(g_C4Timer, temp, 63)                 format(temp, 63, "^"vox/%s seconds until explosion^"", temp)                 play_sound(temp)             }             else if (g_C4Timer < 11)             {                 new temp[64]                                 num_to_word(g_C4Timer, temp, 63)                 format(temp, 63, "^"vox/%s^"", temp)                 play_sound(temp)             }         }         if (BombCountDef && g_Defusing)             client_print(g_Defusing, print_center, "%d", g_C4Timer)     }     else         remove_task(8038) } public bomb_planted(planter) {     g_Defusing = 0         if (BombPlanted)         announceEvent(planter, "SET_UP_BOMB")         g_C4Timer = get_cvar_num("mp_c4timer")     set_task(1.0, "bombTimer", 8038, "", 0, "b") } public bomb_planting(planter)     if (BombPlanting)         announceEvent(planter, "PLANT_BOMB") public bomb_defusing(defuser) {     if (BombDefusing)         announceEvent(defuser, "DEFUSING_BOMB")         g_Defusing = defuser } public bomb_defused(defuser)     if (BombDefused)         announceEvent(defuser, "DEFUSED_BOMB") public bomb_explode(planter, defuser)     if (BombFailed && defuser)         announceEvent(defuser, "FAILED_DEFU") public play_sound(sound[]) {     new players[32], pnum     get_players(players, pnum, "c")     new i         for (i = 0; i < pnum; i++)     {         if (is_user_connecting(players[i]))             continue                 client_cmd(players[i], "spk %s", sound)     } }

can someone please tell me whats going on.

k007 07-15-2006 21:17

Re: Miscstats
 
hey i was tryin to add to sounds to miscstats half an hour ago but i couldn't i tried addin them to the ultimate sound plugin and they worked fine try that.

{NM}Jason 07-16-2006 20:29

Re: Miscstats
 
well if you can try to add these sounds to "ANY" plugin for me i dont know if the bit rate is correct please try for me. [link]www.jrbloodmist.com/sounds.zip[/link] there they are thanks :-)

k007 07-16-2006 21:49

Re: Miscstats
 
k i need to know a few things there is some sound like talk and cheep what are does for streaks, and i want to know the streaks levels like , 3,5,7.....

{NM}Jason 07-16-2006 22:02

Re: Miscstats
 
Quote:

Originally Posted by k007
k i need to know a few things there is some sound like talk and cheep what are does for streaks, and i want to know the streaks levels like , 3,5,7.....


lol talk and cheep arent suspose to be there olny the ones that say filename2.wav and 3 5 7 9 10 and maybe 12

k007 07-16-2006 22:37

Re: Miscstats
 
k give me a dew mins and ill test it too
edit: there is onyl 2 filenames end with 2 lol
edit2: u have 11 streaks the levels can't be divided in 6 ill try going like this {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22}; gl having 22 kills in the row

{NM}Jason 07-16-2006 22:56

Re: Miscstats
 
Quote:

Originally Posted by k007
k give me a dew mins and ill test it too
edit: there is onyl 2 filenames end with 2 lol
edit2: u have 11 streaks the levels can't be divided in 6 ill try going like this {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22}; gl having 22 kills in the row

the dam zip file screwed them up yeah well you know the order

k007 07-16-2006 23:21

Re: Miscstats
 
here it is u need 2 other sounds theoneandonly and maytheforce i think he could find them anyways here it is it's good i'm 100% it will work lol but i have an errors i could fix:( try fixing it it's realy stupid, and if u fix it post it thanks
Code:
/////////////////////////////////////////////////// //  AMXMOD[X]                                    // //   ::Ultimate sounds::                         // //    by Hephaistos (<a href="mailto:[email protected]">[email protected]</a>)       // //    edited by Dizzy (<a href="mailto:[email protected]">[email protected]</a>)   // //                                               // // cvar:                                         // //  streak_mode < flags >                        // //  "a" - messages                               // //  "b" - sounds                                 // //                                               // //  kniff_mode < flags >                         // //  "a" - messages                               // //  "b" - sounds                                 // //                                               // //  hs_mode < flags >                            // //  "a" - messages                               // //  "b" - sounds                                 // //                                               // //  lastman_mode < flags >                       // //  "a" - messages                               // //  "b" - hp                                     // //  "c" - sounds                                 // /////////////////////////////////////////////////// #include <amxmodx> #define KNIFFMESSAGES 4 #define LEVELS 11 #define MESSAGESNOHP 4 #define MESSAGESHP 4 new kills[33] = {0,...}; new deaths[33] = {0,...}; new alone_ann = 0 new levels[11] = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22}; new stksounds[11][] = {  "misc/MULTIK",  "misc/ULTRAK",  "misc/MONSTE",  "misc/KILLIN",  "misc/RAMPAGE",  "misc/DOMINA",  "misc/HOLYSH",  "misc/UNSTOP",  "misc/GODLIKE",  "misc/LUDICR", "misc/WICKED"}; new stkmessages[11][] = {  "%s: Multi-Kill!",  "%s: Ultra-Kill!",  "%s: Monster-Kill!",  "%s: Killing Spree!",  "%s: Rampage!",  "%S: Dominating!",  "%s: Holy Shit!",  "%s: unstoppable!",  "%s: Godlike!",  "%s: Ludicris kill!" "%s: Wicked Sick!"} new kniffmessages[KNIFFMESSAGES][] = {  "%s Sliced And Diced %s!",  "%s Shanked %s!",  "%s Pulled A Knife On %s!", "%s Knived %s!"} new messagesnohp[MESSAGESNOHP][] = {  "%i terrorist vs %i CT^n%s: Now All Depends On You!",  "%i terrorist vs %i CT^n%s: I Hope You Still Have A Healthpack.",  "%i terrorist vs %i CT^n%s: All Your Teammates Were Killed. Good Luck!", "%i terrorist vs %i CT^n%s: Now You Are Alone. Have Fun!"} new messageshp[MESSAGESHP][] = {  "%i terrorist vs %i CT^n%s (%i hp): Now All Depend On You!",  "%i terrorist vs %i CT^n%s (%i hp): I Hope You Still Have A Healthpack.",  "%i terrorist vs %i CT^n%s (%i hp): All Your Teammates Were Killed. Good Luck!", "%i terrorist vs %i CT^n%s (%i hp): Now You Are alone. Have Fun!"} get_streak() { new streak[3] get_cvar_string("streak_mode",streak,2) return read_flags(streak) } public death_event(id) { new streak = get_streak() if ((streak&1) || (streak&2)) {  new killer = read_data(1);  new victim = read_data(2);    kills[killer] += 1;  kills[victim] = 0;  deaths[killer] = 0;  deaths[victim] += 1;    for (new i = 0; i < LEVELS; i++)  {   if (kills[killer] == levels[i])   {    announce(killer, i);    return PLUGIN_CONTINUE;   }  } } return PLUGIN_CONTINUE; } announce(killer, level) { new streak = get_streak() if (streak&1) { new name[32]; get_user_name(killer, name, 32); set_hudmessage(0, 100, 200, 0.05, 0.65, 2, 0.02, 6.0, 0.01, 0.1, 2); show_hudmessage(0, stkmessages[level], name); } if (streak&2){ client_cmd(0, "spk %s", stksounds[level]); } } public reset_hud(id) { set_hudmessage(200, 0, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1) show_hudmessage(0, "Prepare To Fight!") client_cmd(0,"spk misc/PREPARE") new streak = get_streak() if (streak&1) { if (kills[id] > levels[0]) {  client_print(id, print_chat,  "* You are on a killstreak with %d kills.", kills[id]);   } else if (deaths[id] > 1) {  client_print(id, print_chat,  "* Take care, you are on a deathstreak with %d deaths in a row.", deaths[id]); } } } public client_connect(id) { new streak = get_streak() if ((streak&1) || (streak&2)) { kills[id] = 0; deaths[id] = 0; } } public knife_kill() { new kniffmode[4] get_cvar_string("kniff_mode",kniffmode,4) new kniffmode_bit = read_flags(kniffmode) if (kniffmode_bit & 1) { new killer_id = read_data(1) new victim_id = read_data(2) new killer_name[33], victim_name[33] get_user_name(killer_id,killer_name,33) get_user_name(victim_id,victim_name,33) set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1) show_hudmessage(0,kniffmessages[ random_num(0,KNIFFMESSAGES-1) ],killer_name,victim_name) } if (kniffmode_bit & 2) { client_cmd(0,"spk misc/HUMILI") } } public roundend_msg(id) alone_ann = 0 public death_msg(id) { new lmmode[8] get_cvar_string("lastman_mode",lmmode,8) new lmmode_bit = read_flags(lmmode) new players_ct[32], players_t[32], ict, ite, last get_players(players_ct,ict,"ae","CT")   get_players(players_t,ite,"ae","TERRORIST")   if (ict==1&&ite==1) {  new name1[32], name2[32]  get_user_name(players_ct[0],name1,32)  get_user_name(players_t[0],name2,32)  set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)    if (lmmode_bit & 1)  {   if (lmmode_bit & 2)   {    show_hudmessage(0,"%s (%i hp) vs. %s (%i hp)",name1,get_user_health(players_ct[0]),name2,get_user_health(players_t[0]))   }     else   {    show_hudmessage(0,"%s vs. %s",name1,name2)   }     if (lmmode_bit & 4)   {    client_cmd(0,"spk misc/maytheforce")   }  } } else {    if (ict==1&&ite>1&&alone_ann==0&&(lmmode_bit & 4))  {   last=players_ct[0]   client_cmd(last,"spk misc/oneandonly")  }    else if (ite==1&&ict>1&&alone_ann==0&&(lmmode_bit & 4))  {   last=players_t[0]   client_cmd(last,"spk misc/oneandonly")  }    else  {   return PLUGIN_CONTINUE  }  alone_ann = last  new name[32]    get_user_name(last,name,32)    if (lmmode_bit & 1)  {   set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 6.0, 6.0, 0.5, 0.15, 1)     if (lmmode_bit & 2)   {    show_hudmessage(0,messageshp[ random_num(0,MESSAGESHP-1) ],ite ,ict ,name,get_user_health(last))   }     else   {    show_hudmessage(0,messagesnohp[ random_num(0,MESSAGESNOHP-1) ],ite ,ict ,name )   }  }    if (lmmode_bit & 4)  {   client_cmd(last,"spk misc/maytheforce")  } } return PLUGIN_CONTINUE   } public hs() { new hsmode[4] get_cvar_string("hs_mode",hsmode,4) new hsmode_bit = read_flags(hsmode) if (hsmode_bit & 1) {  new killer_id = read_data(1)  new victim_id = read_data(2)  new victim_name[33]    get_user_name(victim_id,victim_name,33)    set_hudmessage(200, 100, 0, -1.0, 0.30, 0, 3.0, 3.0, 0.15, 0.15, 1)  show_hudmessage(killer_id,"::HEADSHOT::^nYou Owned %s !!",victim_name) } if (hsmode_bit & 2) {  client_cmd(0,"spk misc/HEADSH") } } public plugin_precache() { precache_sound("misc/maytheforce.wav") precache_sound("misc/oneandonly.wav") precache_sound("misc/prepare.wav") precache_sound("misc/MULTIK.wav") precache_sound("misc/ULTRAK.wav") precache_sound("misc/MONSTE.wav") precache_sound("misc/KILLIN.wav") precache_sound("misc/RAMPAGE.wav") precache_sound("misc/DOMINA.wav") precache_sound("misc/HOLYSH.wav") precache_sound("misc/UNSTOP.wav") precache_sound("misc/GODLIKE.wav") precache_sound("misc/LUDICR.wav") precache_sound("misc/WICKED.wav") precache_sound("misc/HEADSH.wav") precache_sound("misc/HUMILI.wav") precache_sound("misc/PREPARE.wav") return PLUGIN_CONTINUE }   public plugin_init() { register_plugin("Ultimate Sound","1.1","Dizzy") register_event("DeathMsg","hs","a","3=1") register_event("DeathMsg","knife_kill","a","4&kni") register_event("ResetHUD", "reset_hud", "b"); register_event("DeathMsg", "death_event", "a") register_event("SendAudio","roundend_msg","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw") register_event("TextMsg","roundend_msg","a","2&#Game_C","2&#Game_w") register_event("DeathMsg","death_msg","a") register_cvar("lastman_mode","abc") register_cvar("streak_mode","ab") register_cvar("kniff_mode","ab") register_cvar("hs_mode","ab") return PLUGIN_CONTINUE }

k007 07-16-2006 23:23

Re: Miscstats
 
i'm sorry for my bad coding
edit: i'm so sure it will work thats what i did when i added my 2 sounds and they worked fine

{NM}Jason 07-16-2006 23:56

Re: Miscstats
 
did you test?


All times are GMT -4. The time now is 08:04.

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