help| how to call to cmd with ZCMD
#1

i use with ZCMD / Y_commands and i dont know how i call to cmd to examlpe in dialog.
i try to do that :

CallLocalFunction("OnPlayerCommandReceived", "is", playerid, "/lv");
Reply
#2

If you want to call command /lv you can simply (ZCMD):

pawn Код:
cmd_lv(playerid, params); // remove params if you're not using params with the command
Calling /lv if you're using y_cmd:

pawn Код:
Command_ReProcess(playerid, lv, help); // unsure about this one because I don't use y_commands
Reply
#3

Quote:
Originally Posted by iZN
Посмотреть сообщение
If you want to call command /lv you can simply (ZCMD):

pawn Код:
cmd_lv(playerid, params); // remove params if you're not using params with the command
Calling /lv if you're using y_cmd:

pawn Код:
Command_ReProcess(playerid, lv, help); // unsure about this one because I don't use y_commands
this is dont work.

error 017: undefined symbol "cmd_lv"

and i have this command
Reply
#4

pawn Код:
return cmd_lv(playerid, params);
you have to also add return before cmd_lv if you are using ZCMD.
Reply
#5

Quote:
Originally Posted by SwiZzoR
Посмотреть сообщение
this is dont work.

error 017: undefined symbol "cmd_lv"

and i have this command
Are you sure you have command named lv?

pawn Код:
// using this to redirect to the command
cmd_lv(playerid);

// this is your command
CMD:lv(playerid)
{
    // code
    return true;
}
Reply
#6

Quote:
Originally Posted by nilanjay
Посмотреть сообщение
pawn Код:
return cmd_lv(playerid, params);
you have to also add return before cmd_lv if you are using ZCMD.
Quote:
Originally Posted by iZN
Посмотреть сообщение
Are you sure you have command named lv?

pawn Код:
// using this to redirect to the command
cmd_lv(playerid);

// this is your command
CMD:lv(playerid)
{
    // code
    return true;
}
i use with ZCMD

and i have the coomand :

PHP код:
CMD:lv(playerid,params[])
{
        new 
Float:Pos[3];
        
GetVehiclePos(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]);
        
SetVehiclePos(GetPlayerVehicleID(playerid),Pos[0],Pos[1],Pos[2]);
        return 
SetPlayerInterior playerid ,) ;
    return 
1;

and this is the line to call cmd

PHP код:
            switch ( listitem )
            {
                case 
0: return cmd_lv(playerid); 
this is dont work

undefined symbol "cmd_lv"


oops now its work, i used with y_command and now i change to zcmd and its work !
Reply
#7

Deleted
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)