SA-MP Forums Archive
ZCMD Questions - 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: ZCMD Questions (/showthread.php?tid=565846)



[******] ZCMD Questions - Etolas - 01.03.2015

Hi,

I've two questions please:

- How to make a command "/(", because the script doesn't accept (
- How to make a command to force a player to make another command (Example: /cmd 0 /help ==> Force player 0 to tape /help command)

Thanks


Re: ZCMD Questions - Evocator - 01.03.2015

Hi, number 1 is not possible.
You can use "cmd_help(playerid, "");" for forcing a command to be called on a player. Replace the 'help' with your command.


Re : ZCMD Questions - Etolas - 01.03.2015

Thanks but I don't see how to personalize the cmd_XXXXX(playerid, "");

I don't know how to remplace the XXXXXX by the string from a command


Re: ZCMD Questions - Abagail - 01.03.2015

He was asking about ZCMD, # Ralfie. This should help.

pawn Код:
stock CallCommand(playerid, command[], params[])
{
       new string[64];
       format(string, sizeof(string), "cmd_%s", command);
       CallRemoteFunction(string, "s", params);
       return 1;
}



Re: ZCMD Questions - Golf - 01.03.2015

i dont test this but Abagail methode is the best ^^

PHP код:
CMD:cmd1(playeridparams[])
{
    new 
targetid;
    if(
sscanf(params,"i"targetid)) return SendClientMessage(playerid, -1,"USAGE: /cmd1 [targetid] ");
    if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid, -1,"ERROR: Invalid targetid.");
    
cmd_cmd2(targetidparams);
    return 
1;
}
CMD:cmd2(playeridparams[])
{
    ....




Re : ZCMD Questions - Etolas - 01.03.2015

Abagail

Thanks but:

warning 203: symbol is never used: "playerid"

Haven't you forgotten something in your script ?


Re : ZCMD Questions - Etolas - 02.03.2015

Thanks ******
I've downloaded it.

But I don't understand how to give more than a name to a command. For example, /a and /admin for the same utilisation.

Could you give me an example with Command_AddAltNamed please ?

And I've thoses problems too:

[17:58:45] sscanf warning: No default value found.
[17:58:45] sscanf warning: Unknown format specifier '[', skipping.
[17:58:45] sscanf warning: Unknown format specifier '1', skipping.
[17:58:45] sscanf warning: Unknown format specifier '2', skipping.
[17:58:45] sscanf warning: Unknown format specifier '8', skipping.
[17:58:45] sscanf warning: Unknown format specifier ']', skipping.
[17:58:45] sscanf warning: Format specifier does not match parameter count.
[17:58:52] sscanf warning: No default value found.

Do you know how to fix it ?

Thanks !


Respuesta: Re : ZCMD Questions - !R1Ch@rD! - 03.03.2015

Quote:
Originally Posted by Etolas
Посмотреть сообщение
Thanks ******
I've downloaded it.

But I don't understand how to give more than a name to a command. For example, /a and /admin for the same utilisation.

Could you give me an example with Command_AddAltNamed please ?

And I've thoses problems too:

[17:58:45] sscanf warning: No default value found.
[17:58:45] sscanf warning: Unknown format specifier '[', skipping.
[17:58:45] sscanf warning: Unknown format specifier '1', skipping.
[17:58:45] sscanf warning: Unknown format specifier '2', skipping.
[17:58:45] sscanf warning: Unknown format specifier '8', skipping.
[17:58:45] sscanf warning: Unknown format specifier ']', skipping.
[17:58:45] sscanf warning: Format specifier does not match parameter count.
[17:58:52] sscanf warning: No default value found.

Do you know how to fix it ?

Thanks !
updates the sscanf