Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
new g_nMsgScreenFade
public plugin_init() {
register_plugin("HEAT VISION", "1.0a", "BetaX")
register_clcmd("say /buy", "handle_buy", -1, "...");
g_nMsgScreenFade = get_user_msgid("ScreenFade")
}
public handle_buy(id) {
new pMoney = cs_get_user_money(id);
if (pMoney <= 100) {
return PLUGIN_HANDLED;
}
new pNewMoney = pMoney - 100;
cs_set_user_money(id, pNewMoney, 1);
set_task(0.1,"handle_green",0,"",0,"b")
return PLUGIN_HANDLED;
}
public handle_green(id) {
message_begin(MSG_ONE,g_nMsgScreenFade,{0,0,0},id)
write_short(0.1) // Duration
write_short(10) // Hold time
write_short(0) // Fade type
write_byte (200) // Red
write_byte (0) // Green
write_byte (0) // Blue
write_byte (10) // Alpha
message_end()
return PLUGIN_CONTINUE
}
I did something bad here. :S
(By the way, I'll add in the credits after I am completely done.
Some of this was blatantly stolen from V3X and AsskickR. <3 Open Source guys...)
Something with handle_green... or red, in this situation. >>
I have no idea what I am doing wrong. I think it is the dest in message_begin...
Also, a second question, where can I find a clean list of these types of events and what they do?
I am in the HL SDK, but they're hard to find.
Thanks again for helping a poor noob like myself!