08.06.2015, 23:51
I have an old SAMP script that uses strcmp to work with commands. I recently included zcmd and rewrote a few commands to work with zcmd.
I cant show you an entire public because it'd be way too long, but heres some basic pseudo-code.
That's the basic structure. Commands aren't working at all. They just return SERVER: UNKNOWN COMMAND, both strcmp commands and zcmd commands are broken.
Any suggestions? I've been coding for hours and I'm having a brainfart, this is simple stuff but I just need your guys' help with this one. Thanks.
I cant show you an entire public because it'd be way too long, but heres some basic pseudo-code.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new variables;
if(strcmp(cmdtext, "/hello", true) == 0)
{
SendClientMessage(playerid, -1, "Hello.");
return 1;
}
return 1;
}
CMD:hellothere(playerid, params[])
{
SendClientMessage(playerid, -1, "Hello there.");
return 1;
}
Any suggestions? I've been coding for hours and I'm having a brainfart, this is simple stuff but I just need your guys' help with this one. Thanks.