PDA

View Full Version : Unknown Command.


Glossy42O
27/06/2015, 02:53 PM
Hello lads,

I'm having trouble with my Anti Cheat.

I made a test command using ZCMD. When i connect to my Test Server i receive "Unknown command". My ZCMD is updated as-well.


CMD:guntest(playerid, params[])
{
GivePlayerWeapon(playerid, 24, 200);
return 1;
}
CMD:gunntest(playerid, params[])
{
ServerWeapon(playerid, 24, 200);
return 1;
}

NeamPojma
27/06/2015, 02:57 PM
You need to convert all commands to ZCMD
Also #include <zcmd> on top of your script.

hamzajaved780
27/06/2015, 03:00 PM
Show us your OnPlayerCommandText

Glossy42O
27/06/2015, 03:03 PM
I only have two commands, and i don't have OnPlayerCommandText

SpikeSpigel
27/06/2015, 03:04 PM
First of all. You need to have all the commands conveted to ZCMD.
Next : Modify that:

CMD:guntest(playerid, params[])
{
GivePlayerWeapon(playerid, 24, 200);
return 1;
}
CMD:gunntest(playerid, params[])
{
ServerWeapon(playerid, 24, 200);
return 1;
}


With that

CMD:guntest(playerid)
{
GivePlayerWeapon(playerid, 24, 200);
return 1;
}
CMD:gunntest(playerid)
{
ServerWeapon(playerid, 24, 200);
return 1;
}

Glossy42O
27/06/2015, 03:07 PM
Same

SpikeSpigel
27/06/2015, 03:08 PM
Hmm-.. which of these two commands are you using on your server ? /guntest or /gunntest ?

Glossy42O
27/06/2015, 03:09 PM
Both, i'm testing my anti weapon hack.

Alex Magaņa
27/06/2015, 03:11 PM
Silly question did you added "streamer" to run with your server? Because i know some commands requires streamer.
Define on top:
#include <a_samp>
#include <streamer>
#include <zcmd>
#pragma tabsize 0

and then re-compile your gamemode/filterscript.

Then go to server.cfg and add plugins streamer (...)

SpikeSpigel
27/06/2015, 03:13 PM
Your anti cheat ? Can you show me how you made your anti cheat?

hamzajaved780
27/06/2015, 03:14 PM
Try Adding these callbacks

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) SendClientMessageEx(playerid, COLOR_WHITE, "Command not found. ");
return 1;
}

public OnPlayerCommandReceived(playerid, cmdtext[])
{
return 1;
}

[DOG]irinel1996
27/06/2015, 03:17 PM
First of all. You need to have all the commands conveted to ZCMD.
Next : Modify that:

...


With that

...
ZCMD (http://forum.sa-mp.com/showthread.php?t=91354) has params[] :)

From what I see, I think that your gamemode has any script error or something which makes ZCMD fail. Try using ZCMD in a clean gamemode to see what happens.

Glossy42O
27/06/2015, 03:17 PM
oh wait, all of my anti cheat doesn't work. it worked before O.o