Help with zcmd
#1

Hi guys, I need some help, how can I do -> OnPlayerCommandText(playerid, "/something"); in zcmd?

Thx.
Reply
#2

pawn Код:
CMD:something(playerid,params[]) {

     return 1;
}
Reply
#3

Sidenote: you need to remove your OnPlayerCommandText, and use ZCMD commands just like publics, outside everything, anywhere.
Reply
#4

Sorry, I explained wrong.

I would like something like that.

pawn Код:
if(dialogid == 1)
{
     OnPlayerCommandText(playerid, "/something");
}

and will stay that way

if(dialogid == 1)
{
     zcmd(playerid, "/something");
}
Reply
#5

I guess this is the way.. (Not sure about it!)
pawn Код:
cmd_something(playerid, params);
//Example:
if(dialogid == 1)
{
    cmd_something(playerid, params);
}
Reply
#6

you mean to in that dialog is code witch is in command /something?
Reply
#7

Quote:
Originally Posted by System64
Посмотреть сообщение
you mean to in that dialog is code witch is in command /something?
yes.


Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
I guess this is the way.. (Not sure about it!)
pawn Код:
cmd_something(playerid, params);
//Example:
if(dialogid == 1)
{
    cmd_something(playerid, params);
}
wrong
Reply
#8

you need to place your command out of the OnPlayerCommandText callback if you are using ZCMD

format:
pawn Код:
CMD:something(playerid, params[])
//blah
if(dialogid == 1)
{
       //blah blah
}
return 1;
not really sure >_>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)