Sakura Project Admin
Posts : 3 Join date : 2009-01-30 Age : 32
| Subject: Be your first plugins Sat Jan 31, 2009 7:31 pm | |
| This a simple AMX plugins - Code:
-
#include <amxmodx> //Thanks to tuty for helping me ^_^
//Sound Path #define SND1 "anime/battle/enternalbattle.wav"
new g_Count = 0;
public plugin_init() { register_plugin("Battle Sound", "1.0", "ilham92-cc-sakura"); register_event("TextMsg", "GameCommencing", "a", "2=#Game_Commencing"); register_logevent("roundstart", 2, "1=Round_Start"); } public plugin_precache() { precache_sound(SND1); } public GameCommencing() { g_Count = 0; } public roundstart() { g_Count++; set_hudmessage(0, 255, 0, -1.0, 0.30, 0, 6.0, 8.0); show_hudmessage(0, "Prepare for Battle! Go For it!^nRound %i", g_Count);
new sound1[129]; copy(sound1,128,SND1);
if(contain(sound1,".wav")) { replace(sound1,128,".wav",""); client_cmd(0, "spk %s",sound1); } }
Who know what function of this plugins? | |
|
XiaoKoni
Posts : 1 Join date : 2009-02-01
| Subject: Re: Be your first plugins Sun Feb 01, 2009 2:17 pm | |
| - Sakura Project wrote:
- This a simple AMX plugins
- Code:
-
#include <amxmodx> //Thanks to tuty for helping me ^_^
//Sound Path #define SND1 "anime/battle/enternalbattle.wav"
new g_Count = 0;
public plugin_init() { register_plugin("Battle Sound", "1.0", "ilham92-cc-sakura"); register_event("TextMsg", "GameCommencing", "a", "2=#Game_Commencing"); register_logevent("roundstart", 2, "1=Round_Start"); } public plugin_precache() { precache_sound(SND1); } public GameCommencing() { g_Count = 0; } public roundstart() { g_Count++; set_hudmessage(0, 255, 0, -1.0, 0.30, 0, 6.0, 8.0); show_hudmessage(0, "Prepare for Battle! Go For it!^nRound %i", g_Count);
new sound1[129]; copy(sound1,128,SND1);
if(contain(sound1,".wav")) { replace(sound1,128,".wav",""); client_cmd(0, "spk %s",sound1); } }
Who know what function of this plugins? just a simple sound plugins when game starts "Prepare for Battle! Go For it! will appear in middle (0, 255, 0, -1.0, 0.30, 0, 6.0, 8.0) | |
|