Hi, im triying to force/execute Game commencing ( its when there is just 1 player in a team and another one (2) connects and join enemy team. A message (center) "Game commencing" its shown and the server restart the round)...
Func that doesn't work:
PHP Code:
public GameComencing()
{
message_begin(MSG_ALL, get_user_msgid("TextMsg"), {0,0,0}, 0);
write_byte(print_center);
write_string("#Game_Commencing");
message_end();
}
Some func to see the message ( never happens) :
PHP Code:
public plugin_init()
{
register_message(get_user_msgid("TextMsg"), "onTextMsg");
}
public onTextMsg(msgId, msgDest, msgEnt)
{
static buffer[32];
get_msg_arg_string(2, buffer, 31);
if(equal(buffer, "#Game_Commencing"))
{
server_print("Message: %d - %s - %d - %d", msgId, buffer, msgDest, msgEnt);
}
return PLUGIN_CONTINUE;
}