AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ/Help] Plugin Not working but Code compile working zzz (https://forums.alliedmods.net/showthread.php?t=309895)

shehzad1234 08-11-2018 12:05

[REQ/Help] Plugin Not working but Code compile working zzz
 
This code has been compiled but it does not working on server.

code :-

PHP Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Commands Shortcuts"
#define VERSION "1.0"
#define AUTHOR "BhK"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
//register_clcmd("say", "Cmd_Command")
    
register_cvar("command_prefix""/c"00.00);
    
register_clcmd("say""Cmd_Command", -1"", -1);
}
public 
Cmd_Command(idlevelcid)
{
    if (!
is_user_admin(id))
    {
        return 
0;
    }
    static 
arg[64];
    
read_args(arg63);
    
remove_quotes(arg);
    if (
contain("""/c"))
    {
        return 
0;
    }
    
replace(arg63"rev ""revive ");
    
replace(arg63"roc ""rocket ");
    
replace(arg63"god ""godmode ");
    
replace(arg63"/c ""amx_");
    
client_cmd(id"");
    return 
0;


compile log :-
Code:

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// command_shortcuts.sma
// Header size:            296 bytes
// Code size:              872 bytes
// Data size:              720 bytes
// Stack/heap size:      16384 bytes; estimated max. usage=781 cells (3124 bytes
)
// Total requirements:  18272 bytes
// Done.
//
// Compilation Time: 0.11 sec
// ----------------------------------------

Press enter to exit ...


Relaxing 08-11-2018 12:35

Re: [REQ/Help] Plugin Not working but Code compile working zzz
 
Rewrite from scratch. Not worth editing. Get your version down and stick with it.

CrAzY MaN 08-11-2018 13:17

Re: [REQ/Help] Plugin Not working but Code compile working zzz
 
PHP Code:

static arg[64]; 
read_args(arg63); 
if (
contain(arg"/c")) 
        return 
0

Maybe this will work, but you need to rewrite and first of all say what you want.

shehzad1234 08-11-2018 16:30

Re: [REQ/Help] Plugin Not working but Code compile working zzz
 
@Relaxing @CrazyMan
i tried to edit like this
orignal plugin here :-
https://bhk-cs.blogspot.com/2016/12/...rtcuts-10.html

shehzad1234 08-14-2018 17:54

Re: [REQ/Help] Plugin Not working but Code compile working zzz
 
anyone ;-; ?


All times are GMT -4. The time now is 16:14.

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