Raised This Month: $ Target: $400
 0% 

Help me with give nades, if i say /he


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 05-22-2020 , 15:50   Re: Help me with give nades, if i say /he
Reply With Quote #8

Quote:
Originally Posted by Shadows Adi View Post
So, you need to register the command which you want to deal with:
PHP Code:
register_clcmd("slot1""slot_handle"// use clcmd if you want to be a client console command
register_concmd("slot1""slot_handle"// use concmd if you want the command to be executed from client console or server console. 
When you registered the command, you need to create a public handle where to put the code in:
PHP Code:
public slot_handle( )
{
     
//inside the braces you put your code which you want to be executed when server/client type the command.

Good luck!
I try this but it has no effect, I can still use "slot2; slot1"

PHP Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plug"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("slot2;slot1""slot_handle");
}

public 
slot_handle(id)
{
     
//engclient_cmd(id, "slot2");
     
client_cmd(id"slot2"//inside the braces you put your code which you want to be executed when server/client type the command.
     

And I don't know what I could put to cancel the command or something so I can't do that command "slot2;slot1" which bugs models of weapons in the plugin I'm using.
Arje 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 17:04.


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