Ok, ive been working on this onos blocker because the current ones i dislike. It compiles, but itdoesnt work. It wont let me onos. Can anyone help me? The point is to have at least 3 rines to every 1 ono.
Code:
#include <amxmod>
#include <ns2amx>
#include <amxmodx>
#include <engine>
public plugin_init()
{
if(is_combat())
{
register_plugin("Onos Blocker","1.0.123.1","Newbster & Riot")
register_impulse(117, "checkBlock",0)
register_event("Countdown","gameStarting","a")
}
}
public checkBlock(id)
{
new Players[32], Float:aliens, Float:marines, Float:playerCount, Float: numonos
//gets the number of marines... i think
marines = get_players(Players,playerCount,"e","1")
//ns_get_ent ( classname[], value )
//^ THAT, is what we need to get the number of onoses on field i think.
numonos = find_ent_by_class (-1,"onos")
if ((marines/3) < numonos)
{
client_print(id,print_chat,"[ONOSBLOCKER] You need to have 3 marines for every 1 onos, sorry!")
return PLUGIN_HANDLED
}
else {
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}
public gameStarting()
{
return PLUGIN_CONTINUE
}