AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   AMX Sound Plugin into AMXX Help (https://forums.alliedmods.net/showthread.php?t=22309)

Ran321 12-23-2005 13:42

AMX Sound Plugin into AMXX Help
 
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; }

Brad 12-23-2005 15:30

Moved from "Suggestions / Requests" forum.

watch 12-24-2005 06:26

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?

Ran321 12-25-2005 15:20

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


All times are GMT -4. The time now is 15:56.

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