#1

I kinda need help with this, I read tutorials on it, but I can't seem to even get a proper command working.



If I make a command, it would say things such as the command is undefined.


CMD:mycommand(playerid,params[])

mycommand would come back as undefined.


What should I do?
Reply
#2

Could you explain more what you're having trouble with?
Reply
#3

I'm needing to learn ZCMD.


I put the include at the top of the script like I'm sopose to do.

But, when I make a command it just doesn't ..Work, I mean I dont even have nothing as the command just a simple thing such as;

pawn Код:
COMMAND:something(playerid, params[])
{
 
  return 1;
}
And it would complie and say that something is undefined and COMMAND symble is never used.

Is there any specific things you have to do with the zcmd command, any certain place to put it at.. ect?
Reply
#4

Make sure that
pawn Код:
#include <zcmd>
Is at the top of your script, and that the zcmd.inc is in your /pawno/includes folder.
You use zcmd by using it outside of a SAMP callback, and using one of the predefined macros.
Here is in example.
pawn Код:
CMD:mycommand(playerid,params[])
{
    SendClientMessage(playerid,-1,"Hello, this is a command!");
    return 1;
}
Reply
#5

Do you have the zcmd.inc file inside the pawno/includes folder?
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=91354
Reply
#7

Had the includes set and everything but now that you're saying set the zcmd outside of SAMP callbacks, I only got one warning now, and that's

Код:
symbol is never used: "something"
Reply
#8

Show me all of you're code.
Reply
#9

It's nothing.. I just copied that from the ZCMD thread and pasted it into the script and tried compling to see if it would work, or is the fact that I don't have nothing as a code just a command?

pawn Код:
COMMAND:something(playerid, params)
{
return 1;
}
Warning
Код:
warning 203: symbol is never used: "something"
Reply
#10

You need to add [ ] after params to indicate it as a string? Try that?
pawn Код:
COMMAND:something(playerid, params[])
{
    return 1;
}
You had
pawn Код:
COMMAND:something(playerid, params)
{
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)