2020-05-24, 06:30 AM
This solution seems so complex, here's what I use in my code:
PHP Code:
PlayerExecute(playerid, text[])
{
? ??if(text[0] == '/') Command_ReProcessEx(playerid, text);
? ? else OnPlayerText(playerid, text);
? ? return 1;
}
PHP Code:
stock Command_ReProcessEx(playerid, cmdtext[])
{
? ??#if defined PAWNCMD_INC_
? ? ? ? PC_EmulateCommand(playerid, cmdtext);
? ? #else
? ? ? ? Command_ReProcess(playerid, cmdtext, false);
? ? #endif
? ? return 1;
}