Make sure these commands for Godmode are correct, in defines i made in plugin, as far as i see logic is correct but still just to check if the plugin is working try with this, if plugin is working then it will print in chat "Plugin is working" when only 1 player is alive from Terrorist team if it doesnt do anything please check if plugin itself is loaded or not, if raising any logs then too, reply here
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define ON_COMMAND "say Plugin is working"
#define OFF_COMMAND "say Plugin back to normal state"
new bool:godMode = false
public plugin_init()
{
register_plugin("GODMODE - TR", "1.0", "DiGiTaL")
register_event("DeathMsg", "onDeathMsgEvent", "a")
}
public onDeathMsgEvent()
{
if((get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "TERRORIST") == 1) && !godMode) {
godMode = true
server_cmd(ON_COMMAND)
}
else if((get_playersnum_ex(GetPlayers_ExcludeDead | GetPlayers_MatchTeam, "TERRORIST") != 1) && godMode) {
godMode = false
server_cmd(OFF_COMMAND)
}
}