AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   SDkHOOK Buyzone & Plant Zone (Source) (https://forums.alliedmods.net/showthread.php?t=335887)

Ark_Procession 01-10-2022 18:55

SDkHOOK Buyzone & Plant Zone (Source)
 
Hello, long time ago i saw in this forum someone helping out with the code for creating a buyzone
everywhere and also making so you plant the bomb anywhere.

I can't recall under what post i saw it, i used advanced search and i could not find what im looking for.
I specifically remember the code being really simple and small, from my understanding it hooked the buyzone to the player or something like that, no more than 4 lines of code.

can someone create that code or link me into the right direction?

i tested buyzone plugins and they do not work, also i miss having that plugin in CS Source.
i know CSGO has a cvar for that, but its not the case for cs SOURCE

Thanks

EDIT: Found the Solution!


HTML Code:

#include <sdkhooks>
#include <sdktools>

public void OnClientPutInServer(int iClient)
{
    SDKHook(iClient, SDKHook_PostThink, Cbk_OnPostThink);
}

public void Cbk_OnPostThink(int iClient)
{
    SetEntProp(iClient, Prop_Send, "m_bInBuyZone", 1);
}


HTML Code:

#include <sdkhooks>
#include <sdktools>

public void OnClientPutInServer(int iClient)
{
    SDKHook(iClient, SDKHook_PostThink, Cbk_OnPostThink);
}

public void Cbk_OnPostThink(int iClient)
{
    SetEntProp(iClient, Prop_Send, "m_bInBombZone", 1);
}



All times are GMT -4. The time now is 04:58.

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