Quote:
Originally Posted by The Specialist
Here
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "print spawn"
#define VERSION "1.0"
#define AUTHOR "The Specialist"
#define MAX_PLAYERS 32
new bool:g_restart_attempt[MAX_PLAYERS + 1];
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("ResetHUD", "event_hud_reset", "be");
register_clcmd("fullupdate", "clcmd_fullupdate") ;
register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in");
}
public clcmd_fullupdate()
{
return 1;
}
public event_restart_attempt()
{
new players[32], num;
get_players(players, num, "a");
for (new i; i < num; ++i)
{
g_restart_attempt[players[i]] = true;
}
}
public event_hud_reset(id)
{
if (g_restart_attempt[id])
{
g_restart_attempt[id] = false;
return;
}
event_player_spawn(id)
}
public event_player_spawn(id)
{
client_print(id,print_chat,"Hello Or Whatever");
return 0;
}
|
???
Why do you register a client command and the event TxtMsg?
You should just need this
Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "print spawn"
#define VERSION "1.0"
#define AUTHOR "The Specialist"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("ResetHUD", "event_hud_reset", "be")
}
public event_hud_reset(id)
{
client_print(id,print_chat,"Zomg hi %s",get_user_name(id))
}
__________________