ZCMD Questions
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

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;
}
Reply
#5

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[])
{
    ....

Reply
#6

Abagail

Thanks but:

warning 203: symbol is never used: "playerid"

Haven't you forgotten something in your script ?
Reply
#7

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 !
Reply
#8

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)