Raised This Month: $51 Target: $400
 12% 

SDK Beautiful Hooks not working anymore in latest sourcemod version


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-27-2023 , 14:51   SDK Beautiful Hooks not working anymore in latest sourcemod version
Reply With Quote #1

Global buyzone and bombzone work no more. any ideas or fixes for latest sourcemod stable?

HTML Code:
#include <sdktools>
#include <sdkhooks>

#define VERSION "0.1.0"

public Plugin:myinfo = {
	name = "Plant Anywhere",
	author = "Mitchell",
	description = "Plant the bomb anywhere.",
	version = VERSION,
	url = "SnBx.info"
}

public OnPluginStart() 
{
	CreateConVar("sm_plantanywhere_version", VERSION, "Version of Plant Anywhere", FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);

	HookEvent("player_spawn", Event_PlayerSpawn);
}

public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) 
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(!IsClientInGame(client) || !IsPlayerAlive(client))
		return Plugin_Handled;

	SetEntProp(client, Prop_Send, "m_bInBuyZone", 1);
	return Plugin_Continue;
}

HTML Code:
#include <sdktools>
#include <sdkhooks>

#define VERSION "0.1.0"

public Plugin:myinfo = {
	name = "Plant Anywhere",
	author = "Mitchell",
	description = "Plant the bomb anywhere.",
	version = VERSION,
	url = "SnBx.info"
}

public OnPluginStart() 
{
	CreateConVar("sm_plantanywhere_version", VERSION, "Version of Plant Anywhere", FCVAR_PLUGIN|FCVAR_DONTRECORD|FCVAR_SPONLY|FCVAR_NOTIFY);

	HookEvent("player_spawn", Event_PlayerSpawn);
}

public Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) 
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(!IsClientInGame(client) || !IsPlayerAlive(client))
		return Plugin_Handled;

	SetEntProp(client, Prop_Send, "m_bInBombZone", 1);
	return Plugin_Continue;
}
Ark_Procession is offline
Ark_Procession
Senior Member
Join Date: Jun 2020
Location: Argentina
Old 12-28-2023 , 12:13   Re: SDK Beautiful Hooks not working anymore in latest sourcemod version
Reply With Quote #2

Apparently i have amnesia

https://forums.alliedmods.net/showthread.php?t=335887

Last edited by Ark_Procession; 12-28-2023 at 12:19. Reason: Better solution
Ark_Procession is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode