Commands are fucked -
arjanforgames - 12.07.2013
Why I can't use any command?
I use zcmd but every command is not working.
Also when I type /adsfasdf it does not say "Unknown Command"
Please help! It's urgent!
Re: Commands are fucked -
detter - 12.07.2013
do you have 'return' inside cmd ?
Re: Commands are fucked -
arjanforgames - 12.07.2013
Yes, even the normal
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// all
return 1;
}
return 0;
}
is not working for me.
Re: Commands are fucked -
Chris1337 - 12.07.2013
Show the code please...
Re: Commands are fucked -
arjanforgames - 12.07.2013
Which code? I deleted the commands, nothing worked.
But my code is really new so it has almost no stuff which means if I do /asdfasd it should say: "Unknown Command".
But it doesn't
Re: Commands are fucked -
Vince - 12.07.2013
Quote:
Originally Posted by arjanforgames
I use zcmd
|
Yet you show strcmp commands? Do you even know how ZCMD commands are to be implemented?
Re: Commands are fucked -
arjanforgames - 12.07.2013
This doesnt work also:
pawn Код:
CMD:test(playerid, params[])
{
SendClientMessage(playerid, -1, "test");
return 1;
}
Re: Commands are fucked -
JimmyCh - 12.07.2013
The thing is, you don't put the zcmds under OnPlayerCommandText.
Example:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// all
return 1;
}
return 0;
}
You can't use the following under OnPlayerCommandText
pawn Код:
CMD:test(playerid, params[])
{
SendClientMessage(playerid, -1, "test");
return 1;
}
Example of what NOT to do:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
CMD:test(playerid, params[])
{
SendClientMessage(playerid, -1, "test");
return 1;
}
return 1;
}
If you put the CMD:test under OnPlayerCommandText, it doesn't work, because you can only put strcmp commands under OnPlayerCommandText.
zcmd can be put anywhere on the script, just do it like I showed you.
Hope I helped!
Re: Commands are fucked -
arjanforgames - 12.07.2013
I had it at the bottom of my script
I need this fixed!!
Re: Commands are fucked -
Sandiel - 12.07.2013
You can't use strcmp and zcmd at the same time, you must remove the OnPlayerCommandText callback, and go along with your ZCMD commands.