Raised This Month: $ Target: $400
 0% 

AMX Sound Plugin into AMXX Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ran321
Junior Member
Join Date: Jul 2005
Old 12-23-2005 , 13:42   AMX Sound Plugin into AMXX Help
Reply With Quote #1

I got this amxx plugin that I wanted to have in AMXX, it compiles but doesn't run, just wondering what needs to be done to make it work with AMXX, I would do it myself except i have no clue how to script in amxx.

Code:
#include <amxmodx> // Unreal Tournament Killing Spree Plugin // PsychoGuard's Code, modified by Duca // This version is modified off of Ducs's, this has unmodified UT2003 sounds // // CVARs: // // ut_streak_mode - default "abe" // // a - announce to all players by sound // b - announce to all players by hud message // c - announce to scorer by sound // d - announce to scorer by hud message // e - announce current death/killstreak at round start new kills[33] = {0,...}; new deaths[33] = {0,...}; #define LEVELS 9 new levels[9] = {2, 3, 4, 5, 6, 7, 8, 9, 10}; new sounds[9][] = {"misc/doublekill", "misc/triplekill", "misc/megakill", "misc/ultrakill", "misc/monsterkill", "misc/ludicrouskill", "misc/whickedsick", "misc/holyshit", "misc/godlike"}; new messages[9][] = {"%s: DOUBLE-KILL!!!", "%s: TRIPLE-KILL!!!", "%s: MEGA KILL!!!", "%s: ULTRA-KILL!!!", "%s: MONSTER KILL!!!", "%s: LUDICROUS KILL!!!", "%s IS WICKED SICK!!!", "%s: HOLY SHIT!!!", "%s IS GODLIKE!!!" }; is_mode_set(bits) { new mode[9]; get_cvar_string("ut_streak_mode", mode, 8); return read_flags(mode) & bits; } public death_event(id) { 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 name[33]; 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); if (is_mode_set(2)) { show_hudmessage(0, messages[level], name); } else if (is_mode_set(8)) { show_hudmessage(killer, messages[level], name); } if (is_mode_set(1)) { client_cmd(0, "spk %s", sounds[level]); } else if (is_mode_set(4)) { client_cmd(killer, "spk %s", sounds[level]); } } public reset_hud(id) { if (is_mode_set(16)) { 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) { kills[id] = 0; deaths[id] = 0; } public plugin_precache(){ precache_sound("misc/doublekill.wav") precache_sound("misc/triplekill.wav") precache_sound("misc/megakill.wav") precache_sound("misc/ultrakill.wav") precache_sound("misc/monsterkill.wav") precache_sound("misc/ludicrouskill.wav") precache_sound("misc/whickedsick.wav") precache_sound("misc/holyshit.wav") precache_sound("misc/godlike.wav") return PLUGIN_CONTINUE } public plugin_init() { register_plugin("UT Killing Spree 2003", "2.0.0.3", "tadmaz"); register_cvar("ut_streak_mode", "abe"); register_event("ResetHUD", "reset_hud", "b"); register_event("DeathMsg", "death_event", "a"); return PLUGIN_CONTINUE; }
Ran321 is offline
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 12-23-2005 , 15:30  
Reply With Quote #2

Moved from "Suggestions / Requests" forum.
Brad is offline
watch
Senior Member
Join Date: Sep 2005
Old 12-24-2005 , 06:26  
Reply With Quote #3

i tried it on lan and the only error i could find was the sounds wernt playnig because i didnt have them, when i died it came up with the hudmessages ok. could you maybe specify what isnt working?
__________________
Code:
#include <amusing_small_signiture>
watch is offline
Ran321
Junior Member
Join Date: Jul 2005
Old 12-25-2005 , 15:20  
Reply With Quote #4

nvm, i used the ultimate_sounds plugin and just added in the extra sounds, i'm not sure but when i loaded it it said Bad Load
Ran321 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:55.


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