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

[REQ] Client_cmd disconnect


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-23-2020 , 15:28   [REQ] Client_cmd disconnect
Reply With Quote #1

I want a plugin to be activated when the player exits this code
Code:
disconnect = client_cmd(id,"bind b buy");
alferd is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-23-2020 , 15:33   Re: [REQ] Client_cmd disconnect
Reply With Quote #2

Changing player's binds is considered slowhacking and is not supported here.
__________________

Last edited by fysiks; 02-23-2020 at 15:34.
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 02-26-2020 , 01:18   Re: [REQ] Client_cmd disconnect
Reply With Quote #3

I think he wants to detect when player uses the buy menu
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-26-2020 , 02:49   Re: [REQ] Client_cmd disconnect
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
I think he wants to detect when player uses the buy menu
yes,My server has a separate purchase menu:

PHP Code:
public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("buymenupro""BuyMenuPro");
    
register_clcmd("buyequipment""BuyMenuEquipment");
}

public 
client_connect(id)
{
    
client_cmd(id,"bind b buymenupro")
        
client_cmd(id,"bind o buyequipment")

PHP Code:
disconnect client_cmd(id,"bind b buy"); and client_cmd(id,"bind o buyequip"

Last edited by alferd; 02-26-2020 at 02:52.
alferd is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-26-2020 , 02:55   Re: [REQ] Client_cmd disconnect
Reply With Quote #5

PHP Code:
public client_disconnect(id)
{
    
client_cmd(id"bind b buy");
    
client_cmd(id"bind o buyequip");

You can also use your new menu by
PHP Code:
register_clcmd("buy","YourNewMenu"); 
__________________

Last edited by Sanjay Singh; 02-26-2020 at 02:56.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 02-26-2020 , 03:08   Re: [REQ] Client_cmd disconnect
Reply With Quote #6

Quote:
Originally Posted by Sanjay Singh View Post
[PHP]
You can also use your new menu by
PHP Code:
register_clcmd("buy","YourNewMenu"); 
Thank You
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 02-26-2020 , 09:44   Re: [REQ] Client_cmd disconnect
Reply With Quote #7

It's still slowhacking which isn't supported here like Fysiks said.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-26-2020 , 09:45   Re: [REQ] Client_cmd disconnect
Reply With Quote #8

Quote:
Originally Posted by Sanjay Singh View Post
PHP Code:
public client_disconnect(id)
{
    
client_cmd(id"bind b buy");
    
client_cmd(id"bind o buyequip");

You can also use your new menu by
PHP Code:
register_clcmd("buy","YourNewMenu"); 
That's not going to work. You can't hook a client-side command like that.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 02-26-2020 , 12:15   Re: [REQ] Client_cmd disconnect
Reply With Quote #9

I'm guessing he wants to change clients binds to his buymenu on connect and revert them back to "normal" on disconnect.
You shouldn't change any binds without asking for clients permission.
Also I don't think you can even execute any slowhacking on disconnect.
__________________
Rohanlogs is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 02-26-2020 , 20:53   Re: [REQ] Client_cmd disconnect
Reply With Quote #10

Check ctf plugin it uses custom buy menu without changing client side settings.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
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 13:01.


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