回复: 希望能編個利用指令令畫面震動的插件
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Test"
#define AUTHOR "Jim"
#define VERSION "1.0"
new g_maxplayers
new g_msgScreenShake
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("Damage", "event_damage", "be", "2>10", "3=0", "4!0")
g_maxplayers = get_maxplayers()
g_msgScreenShake = get_user_msgid("ScreenShake")
}
public event_damage(id)
{
if(pev(id, pev_dmg_inflictor) > g_maxplayers)
{
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
write_short(1<<14);
write_short(1<<14);
write_short(1<<14);
message_end()
}
}
页:
[1]