AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   can anyone make amx_exec , amx_execall plugin? (https://forums.alliedmods.net/showthread.php?t=185864)

samer 123 05-22-2012 13:19

can anyone make amx_exec , amx_execall plugin?
 
hey .. can anyone make amx_exec , amx_execall plugin?
commands :
PHP Code:

amx_exec <nick> <command> ....
amx_execall <commands>  for all players..
for 
example 
amx_exec player "connect ipserver" and the player will connect to the server.. 


dasha 05-22-2012 15:49

Re: can anyone make amx_exec , amx_execall plugin?
 
PHP Code:

client_cmd(id"connect server:port"

If not working then:

PHP Code:

client_cmd(id";Connect server:port"

About the amx_exec has I know that is the plugin amx_fuckoff, right?
Anyway, open the sma of the plugin and add the commands amx_exec connect ..

kramesa 05-22-2012 16:00

Re: can anyone make amx_exec , amx_execall plugin?
 
Quote:

Originally Posted by dasha (Post 1714446)
PHP Code:

client_cmd(id"connect server:port"

If not working then:

PHP Code:

client_cmd(id";connect server:port"

About the amx_exec has I know that is the plugin amx_fuckoff, right?
Anyway, open the sma of the plugin and add the commands amx_exec connect ..

Wrong.

use ;Connect ip

akcaliberg 05-22-2012 16:51

Re: can anyone make amx_exec , amx_execall plugin?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Exec"
#define VERSION "1.0"
#define AUTHOR "samer 123"

new  target[32],command[132],a_command[132],Uid;
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_exec","cmdExec",ADMIN_CVAR,"Usage: amx_exec <nick> ^"command^"")
    
register_concmd("amx_exec","cmdExecall",ADMIN_CVAR,"Usage: amx_execall ^"command^"")
}
public 
cmdExec(id) {
    
read_argv(1,target,31)
    
read_argv(2,command,131)
    
Uid find_player("bhl",target)
    if(
Uid == 0) {
        
console_print(id,"Player Not Found !")
        return 
PLUGIN_HANDLED
    
}
    
client_cmd(Uid,"%s",command)
    return 
PLUGIN_HANDLED
    
}
public 
cmdExecall(id) {
    
read_argv(1,a_command,131)
    for(new 
133i++) {
        
client_cmd(i,"%s",a_command)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
    


amx_exec player "command"
amx_execall "command"

I have made it quickly. If it gives error just say. And If anything is wrong please correct me.

dasha 05-22-2012 17:18

Re: can anyone make amx_exec , amx_execall plugin?
 
Quote:

Originally Posted by kramesa (Post 1714449)
Wrong.

use ;Connect ip

And what's supposed to be "server", ofc ip!

Exolent[jNr] 05-22-2012 17:33

Re: can anyone make amx_exec , amx_execall plugin?
 
Quote:

Originally Posted by dasha (Post 1714515)
And what's supposed to be "server", ofc ip!

The importance of his post was the capital 'C' in ';Connect', not the change of 'server:port' to 'ip'.

dasha 05-22-2012 17:41

Re: can anyone make amx_exec , amx_execall plugin?
 
Quote:

Originally Posted by Exolent[jNr] (Post 1714531)
The importance of his post was the capital 'C' in ';Connect', not the change of 'server:port' to 'ip'.

Ohhh my bad sorry :P
I forgot about the caps lock
:(

samer 123 05-23-2012 07:07

Re: can anyone make amx_exec , amx_execall plugin?
 
thnx its working :)

akcaliberg 05-23-2012 07:51

Re: can anyone make amx_exec , amx_execall plugin?
 
PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Exec"
#define VERSION "1.0"
#define AUTHOR "samer 123"

new  target[32],command[132],a_command[132],Uid;
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("amx_exec","cmdExec",ADMIN_CVAR,"Usage: amx_exec <nick> ^"command^"")
    
register_concmd("amx_execall","cmdExecall",ADMIN_CVAR,"Usage: amx_execall ^"command^"")
}
public 
cmdExec(id) {
    
read_argv(1,target,31)
    
read_argv(2,command,131)
    
Uid find_player("bhl",target)
    if(
Uid == 0) {
        
console_print(id,"Player Not Found !")
        return 
PLUGIN_HANDLED
    
}
    
client_cmd(Uid,"%s",command)
    return 
PLUGIN_HANDLED
    
}
public 
cmdExecall(id) {
    
read_argv(1,a_command,131)
    for(new 
133i++) {
        
client_cmd(i,"%s",a_command)
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED
    


I forgot to make amx_execall :D Use this.

samer 123 05-23-2012 11:29

Re: can anyone make amx_exec , amx_execall plugin?
 
amx_execall not working .. can you fix it ?


All times are GMT -4. The time now is 00:20.

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