SA-MP Forums Archive
help| how to call to cmd with ZCMD - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help| how to call to cmd with ZCMD (/showthread.php?tid=512891)



help| how to call to cmd with ZCMD - SwiZzoR - 13.05.2014

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");


Re: help| how to call to cmd with ZCMD - iZN - 13.05.2014

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



Re: help| how to call to cmd with ZCMD - SwiZzoR - 13.05.2014

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


Re: help| how to call to cmd with ZCMD - nilanjay - 13.05.2014

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


Re: help| how to call to cmd with ZCMD - iZN - 13.05.2014

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;
}



Re: help| how to call to cmd with ZCMD - SwiZzoR - 13.05.2014

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 !


Re: help| how to call to cmd with ZCMD - nilanjay - 13.05.2014

Deleted