Raised This Month: $ Target: $400
 0% 

AMX Sound Plugin into AMXX Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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


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