Pawn.CMD doesn't return command arguments
mrKarton opened this issue · comments
Hello. I am coding for sa-mp for 5 days. But I can't find same issues in internet. So, my code is in filterscript:
#include <a_samp>
#include <mxINI>
#define FILTERSCRIPT
#include <Pawn.CMD>
#include <colors>
#include "cmd_flags"
cmd:a(playerid, args[])
{
printf("args count: %d", sizeof(args));
return 1;
}
public OnPlayerCommandReceived(playerid, cmd[], params[], flags)
{
new pname[30];
GetPlayerName(playerid, pname, 30);
new fname[50];
format(fname, 50, "users/%s.ini", pname);
new inif = ini_openFile(fname);
new pRang;
ini_getInteger(inif, "adminLevel", pRang);
ini_closeFile(inif);
if (flags > pRang)
{
SendClientMessage(playerid, RED, "You have no permissions for access this command");
return 0;
}
return 1;
}
public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags)
{
if (result == -1)
{
SendClientMessage(playerid, RED, "SERVER: Unknown command.");
return 0;
}
return 1;
}
public OnFilterScriptInit()
{
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
and when I type /a 1 2 3 in chat, my console says args count: 0
.
so sorry if this is dumb question but I tired of finding solve.