Calling a command
#1

Hi!
I'm using ZCMD.
How can I call a textcommand from a function?
Like when someone types /dosome - it will go to ... actually I don't know where it goes and that is the problem, but the function dosome is defined by zcmd(dosome, playerid, params[]) {... }
How can I call this command inside a function?
Like something OnPlayerCommandText(playerid, "/dosome");
Also I need the params...
So format(text, 256, "/dosome %d", playerid);
OnPlayerCommandText(playerid, text);
but doesn't work... any other ideas?
Reply
#2

Ask in ZCMD topic.
Reply
#3

Don't think this really matters.
Can I even do something like this:
format(text, 256, "/dosome %d", playerid);
OnPlayerCommandText(playerid, text);

?

Even if the /dosome function is a non-zcmd command?
Reply
#4

Yes, and you don't need 256 cells, 128 is enough.
Reply
#5

Oh, well I found it anyway.
It's zcmd_%1(%2, %3);
name, playerid, params...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)