PHP Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new MeleeOnlyOn = GetConVarInt(g_meleeonly)
Are you trying to limit melee per player if so:
you need to devise a way to set the variable (random, by admin choice ... etc.)
make a global
PHP Code:
new bool:MeleeOnly[MAXPLAYERS +1];
and then
PHP Code:
public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
MeleeOnly[client] = 0 //make it 1 if you want it on
But seeing as you have a "shared" CVAR that is server wide you are not making it player specific and you should just
make MeleeOnlyOn global -
then move "MeleeOnlyOn = GetConVarInt(g_meleeonly)"
to OnMapStart or hook the round and put it in round_start.