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

Solved [CSGO] Weird Bhop. ReplicateToClient


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cruze
Veteran Member
Join Date: May 2017
Old 10-20-2018 , 10:46   [CSGO] Weird Bhop. ReplicateToClient
Reply With Quote #1

PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <cstrike>

bool g_bToggle[MAXPLAYERS+1] = false;
ConVar sv_autobunnyhopping;


public 
Plugin myinfo =
{
    
name "[CSGO] Per Player Bhop Toggle",
    
author "Cruze",
    
description "",
    
version "1.0",
    
url ""
};


public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_bhop"CMD_Bhop"Toggle Bhop.");
    
sv_autobunnyhopping FindConVar("sv_autobunnyhopping");
    
sv_autobunnyhopping.BoolValue false;
}

public 
Action CMD_Bhop(int clientint args)
{
    if(!
IsClientValid(client) || !IsClientInGame(client))
    {
        return 
Plugin_Handled;
    }
    if(!
g_bToggle[client])
    {
        
sv_autobunnyhopping.ReplicateToClient(client"1");
        
PrintToChat(client"Enabled Autobhop for you");
        
g_bToggle[client] = true;
    }
    else
    {
        
sv_autobunnyhopping.ReplicateToClient(client"0");
        
PrintToChat(client"Disabled Autobhop for you");
        
g_bToggle[client] = false;
    }
    return 
Plugin_Handled;
}

bool IsClientValid(int client)
{
    return ((
client 0) && (client <= MaxClients));

I was trying per player autobhop but encountered something weird=> https://streamable.com/ifyus
Can someone tell me how can I make this work?
__________________
Taking paid private requests! Contact me

Last edited by Cruze; 10-21-2018 at 09:37.
Cruze 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 03:29.


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