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

Solved [CS:GO] Help my plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Heypio
Junior Member
Join Date: Nov 2017
Old 12-25-2020 , 18:30   [CS:GO] Help my plugin
Reply With Quote #1

I coded a plugin showing that players are using hooks. I want this message to be written to the ct team and server administrators console. How can I do that?

Note: I'm sorry for my bad english.

Code:
#include <sourcemod>
#include <sdktools>
#include <cstrike>
#include <sdkhooks>
#include <hgr>

bool godRound = false;

public OnPluginStart()
{
    HookEvent("round_end", Round_END);
}

public Action:OnClientSayCommand(client, const char[] command, const char[] sArgs) 
{
    if (StrEqual(sArgs, "!godct",true)) {
        godRound = true;
    }  
    else
    {
        godRound = false;
    }
}

public Action:HGR_OnClientHook(int client)
{
    for(int i = 1; i <= MaxClients; i++) 
	{
    	if(!godRound) {
            PrintToConsole(i, "%N player pressed the hook.", client);		
        }
    }
    return Plugin_Continue;	
}
public Action:Round_END(Event event, const char[] name, bool dontBroadcast)
{
    godRound = false;
}

Last edited by Heypio; 12-29-2020 at 13:35.
Heypio is offline
 



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 05:40.


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