Skip to content

Conversation

@JUNESYNGOTOFLEX
Copy link

@JUNESYNGOTOFLEX JUNESYNGOTOFLEX commented Jun 10, 2025

custom scenario

#include <amxmodx>
#include <reapi>

const GR_UGLY    = 1337;

public plugin_init()
{
	RegisterHookChain(RG_CSGameRules_PlayerRelationship, "CSGameRules_PlayerRelationship", false);
}

public function(player1, player2)
{
	if (rg_player_relationship(player1, player2) == GR_UGLY)
	{
		client_print(0, print_chat, "Custom relation between %n and %n", player1, player2);
	}
}

public CSGameRules_PlayerRelationship(const pPlayer, const pEntity)
{
	// Not a player
	if (!is_user_connected(pEntity)) {
		return HC_CONTINUE;
	}
	
	if (pEntity == 2)
	{
		SetHookChainReturn(ATYPE_INTEGER, GR_UGLY);
		return HC_SUPERCEDE;
	}
	
	return HC_CONTINUE;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant