Raised This Month: $ Target: $400
 0% 

Plugin Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
godzcsgo
Senior Member
Join Date: Jul 2017
Old 09-05-2017 , 14:45   Plugin Help
Reply With Quote #1

can someone make a plugin that enables disabled bhop

like this

Enabled:
sm_cvar abner_autobhop 1
sm_cvar sv_autobunnyhopping 1
sm_cvar sv_enablebunnyhopping 1
sm_rcon sm plugins load shavit-core.smx

Disabled:
sm_cvar abner_autobhop 0
sm_cvar sv_autobunnyhopping 0
sm_cvar sv_enablebunnyhopping 0
sm_rcon sm plugins unload shavit-core.smx

Would be grateful!
godzcsgo is offline
StealthGus
Junior Member
Join Date: Mar 2015
Old 09-05-2017 , 18:59   Re: Plugin Help
Reply With Quote #2

Why not just make 2 configs, 1 called bhop_enable.cfg and 1 called bhop_disable.cfg each with their respective commands and then run sm_rcon exec bhop_enable.cfg or sm_rcon exec bhop_disable.cfg?
StealthGus is offline
fraise
Member
Join Date: Sep 2016
Location: Paris, France
Old 09-06-2017 , 19:57   Re: Plugin Help
Reply With Quote #3

Here you are, just replace ADMFLAG_ROOT by the flag you need =)

PHP Code:
#include <sourcemod>
#include <colors>


bool trigger;

int autobunnyhopping;
int enableautobunnyhopping;

public 
void OnPluginStart()
{
    
RegAdminCmd("sm_autobhop"Trigger_AutoBhopADMFLAG_ROOT);
    
    
FindConVar("sv_autobunnyhopping");
    
FindConVar("sv_enablebunnyhopping");
    
FindConVar("abner_autobhop");
}

public 
Action Trigger_AutoBhop(int clientint args)
{
    if(!
trigger// Bhop On
    
{
        
SetCvar("sv_autobunnyhopping"1);
        
SetCvar("sv_enablebunnyhopping"1);
        
SetCvar("abner_autobhop"1);
        
ServerCommand("sm plugins load shavit-core");
        
trigger=true;
        
CPrintToChat(client"Bhop {geen}On");
    }
    else 
// Bhop Off
    
{
        
SetCvar("sv_autobunnyhopping"0);
        
SetCvar("sv_enablebunnyhopping"0);
        
SetCvar("abner_autobhop"0);
        
ServerCommand("sm plugins unload shavit-core");
        
trigger=false;
        
CPrintToChat(client"Bhop {darkred}Off")
    }
    return;
    

__________________
\o/
fraise is offline
fiction
Member
Join Date: May 2017
Old 09-06-2017 , 23:17   Re: Plugin Help
Reply With Quote #4

Quote:
Originally Posted by fraise View Post
Here you are, just replace ADMFLAG_ROOT by the flag you need =)
What is this? I appreciate that you're trying to help people but you should at least check that your code compiles and works before posting it for someone else to use.
fiction is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-07-2017 , 02:34   Re: Plugin Help
Reply With Quote #5

you need colors.inc to compile it. I guess
__________________
Taking paid private requests! Contact me
Cruze is offline
Cruze
Veteran Member
Join Date: May 2017
Old 09-07-2017 , 02:37   Re: Plugin Help
Reply With Quote #6

Change
PHP Code:
 CPrintToChat(client"Bhop {geen}On"); 
To

PHP Code:
 CPrintToChat(client"Bhop {green}On"); 
__________________
Taking paid private requests! Contact me

Last edited by Cruze; 09-07-2017 at 02:37.
Cruze is offline
fiction
Member
Join Date: May 2017
Old 09-07-2017 , 04:32   Re: Plugin Help
Reply With Quote #7

Quote:
Originally Posted by Cruze View Post
you need colors.inc to compile it. I guess
Yeah that's the only problem...
fiction is offline
Cripix
Senior Member
Join Date: Sep 2016
Location: French, Bordeaux
Old 09-07-2017 , 04:57   Re: Plugin Help
Reply With Quote #8

Quote:
Originally Posted by fiction View Post
Yeah that's the only problem...
https://forums.alliedmods.net/showthread.php?t=96831
__________________
My jailbreak Server :
Cripix is offline
fiction
Member
Join Date: May 2017
Old 09-07-2017 , 15:21   Re: Plugin Help
Reply With Quote #9

Quote:
Originally Posted by Cripix View Post
I was being sarcastic . There's many other problems with it.
fiction is offline
fraise
Member
Join Date: Sep 2016
Location: Paris, France
Old 09-07-2017 , 15:50   Re: Plugin Help
Reply With Quote #10

yeah sorry, was tired, gonna fix it in the minute =)
__________________
\o/
fraise 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 02:37.


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