[Plugin] Pawn.CMD

Nice plugin
Reply

Hi I've tried to change my ZCMD to this CMD Processor
But i've got many errors like
Undefined symbol cmd_kill
all of my return cmd_kill(playerid,params) commands
Also do i need to removed zcmd include and replace Pawn.cmd?? thanks
anyways nice job sir +rep
Reply

Problem Solved
I just renamed "return cmd_command" to callcmd::command
thanks to this cmd processor
+Rep

Edit:
Quote:

Pawn.CMD is not compatible with zcmd style anymore.

Can you give some example of zcmd style that incompatible in Pawn.cmd so that I can find it
thanks
Reply

1. By the same team can attach multiple flags?
2. There is something Tipo this function: DC_CMD (playerid,) ;?
Reply

Quote:
Originally Posted by PRoleplay
Посмотреть сообщение
Can you give some example of zcmd style that incompatible in Pawn.cmd so that I can find it
thanks
PHP код:
forward OnPlayerCommandReceived(playeridcmd[], params[], flags);
forward OnPlayerCommandPerformed(playeridcmd[], params[], resultflags); 
Different parameters in these callbacks.
Quote:
Originally Posted by pawnuser
Посмотреть сообщение
1. By the same team can attach multiple flags?
2. There is something Tipo this function: DC_CMD (playerid,) ;?
1. Operator '|'. (or)
2. native PC_EmulateCommand(playerid, const cmdtext[]);
Reply

So well, I have had this command before, working, but suddenly it gives me errors;
Quote:

..\Project Palomino Creek\vehicles.script(30) : error 029: invalid expression, assumed zero
..\Project Palomino Creek\vehicles.script(30) : error 017: undefined symbol "pc_cmd_v"
..\Project Palomino Creek\vehicles.script(30) : error 029: invalid expression, assumed zero
..\Project Palomino Creek\vehicles.script(30) : fatal error 107: too many error messages on one line

Any idea?
Reply

I am trying to remove zcmd include and add this plugin, but it can't get loaded

Код:
[30.07.2016 15:08:23] [debug] Run time error 19: "File or function is not found"
[30.07.2016 15:08:23] [debug]  
[30.07.2016 15:08:23] [debug] Run time error 19: "File or function is not found"
[30.07.2016 15:08:23] [debug]
Plugins line in server.cfg

Код:
plugins pawncmd mysql sscanf irc crashdetect streamer regex TDE
However a blank gamemode only with this plugin works normally.

//EDIT

Okay, I've realised what is the problem. The problem is y_va include

Код:
#define va_start<%0> (va_:(%0))

stock va_format(out[], size, fmat[], va_:STATIC_ARGS)
{
        new
                num_args,
                arg_start,
                arg_end;
        // Get the pointer to the number of arguments to the last function.
        #emit LOAD.S.pri   0
        #emit ADD.C        8
        #emit MOVE.alt
        // Get the number of arguments.
        #emit LOAD.I
        #emit STOR.S.pri   num_args
        // Get the variable arguments (end).
        #emit ADD
        #emit STOR.S.pri   arg_end
        // Get the variable arguments (start).
        #emit LOAD.S.pri   STATIC_ARGS
        #emit SMUL.C       4
        #emit ADD
        #emit STOR.S.pri   arg_start
        // Using an assembly loop here screwed the code up as the labels added some
        // odd stack/frame manipulation code...
        while (arg_end != arg_start)
        {
                #emit MOVE.pri
                #emit LOAD.I
                #emit PUSH.pri
                #emit CONST.pri    4
                #emit SUB.alt
                #emit STOR.S.pri   arg_end
        }
        // Push the additional parameters.
        #emit PUSH.S       fmat
        #emit PUSH.S       size
        #emit PUSH.S       out
        // Push the argument count.
        #emit LOAD.S.pri   num_args
        #emit ADD.C        12
        #emit LOAD.S.alt   STATIC_ARGS
        #emit XCHG
        #emit SMUL.C       4
        #emit SUB.alt
        #emit PUSH.pri
        #emit MOVE.alt
        // This gets confused if you have a local variable of the same name as it
        // seems to factor in them first, so you get the offset of the local
        // variable instead of the index of the native.
        #emit SYSREQ.C     format
        // Clear the stack.
        #emit CONST.pri    4
        #emit ADD
        #emit MOVE.alt
        // The three lines above get the total stack data size, now remove it.
        #emit LCTRL        4
        #emit ADD
        #emit SCTRL        4
        // Now do the real return.
}
Any ideas how to get it working together?
Reply

Try this:
Код:
plugins crashdetect mysql sscanf irc streamer regex TDE pawncmd
Reply

I did something and now I can't even compile the whole script with y_va include, which I do need - compiler crashes with y_va/command include, if I remove y_va include or command include, everything works. Actually I use zcmd and with y_va it works, but y_va looks incompatible to this command include.

//EDIT

Fixed, plugins order wasn't the problem, it was caused by y_va include, but somehow I compiled it.
Reply

None of my commands seem to work. Each one I type, nothing happens at all, no logs are showing, plugin is loading fine, plugin is included inside the script.
Reply

Quote:
Originally Posted by BR3TT
Посмотреть сообщение
None of my commands seem to work. Each one I type, nothing happens at all, no logs are showing, plugin is loading fine, plugin is included inside the script.
You're probably doing something wrong in the callbacks, a bad return value.
Reply

I've fixed my issue.
Reply

Quote:
Originally Posted by BR3TT
Посмотреть сообщение
I've fixed my issue.
How?
Reply

Quote:
Originally Posted by YourShadow
Посмотреть сообщение
How?
For some reason I had define filterscript at the top of my GM which must have been when I moved something over
Reply

If you remove the function like getflags GetName deletecomnand did will be better optimized and faster? Or is the same thing?
Just ask
Reply

Quote:
Originally Posted by Mister0
Посмотреть сообщение
If you remove the function like getflags GetName deletecomnand did will be better optimized and faster? Or is the same thing?
Just ask
Those functions do not affect speed.
Reply

How can i call a custom string? I have someting like: format( cmd, 32, "stunt%d", stuntID ); so how can i call it?
Reply

You should use CallRemoteFunction, but I'm not sure about the syntax, gotta check what it renames the public to.
Reply

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
How can i call a custom string? I have someting like: format( cmd, 32, "stunt%d", stuntID ); so how can i call it?
PHP код:
native PC_EmulateCommand(playerid, const cmdtext[]); 
Reply

Quote:
Originally Posted by nGen.SoNNy
Посмотреть сообщение
How can i call a custom string? I have someting like: format( cmd, 32, "stunt%d", stuntID ); so how can i call it?
pawn Код:
format( cmd, 32, "/stunt%d", stuntID );
PC_EmulateCommand( playerid, cmd ); // recommended, as it is handled as a regular command
or
pawn Код:
format( cmd, 32, "pc_cmd_stunt%d", stuntID );
CallLocalFunction( cmd, "s", "\0" );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)