20.10.2016, 19:13
I tried this:
Focus:
The command is simply not sent ...
PHP код:
CMD:fakechat(playerid, params[])
{
if(!IsAllowed(playerid, 5)) return NoAuth(playerid);
new playerb, string[128];
if(sscanf(params, "us[128]", playerb, string)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fakechat [playerid] [text]");
if(!IsPlayerConnected(playerb) || playerid == playerb) return SendClientMessage(playerid, COLOR_WHITE, "Invalid ID.");
if(IsImmune(playerid, playerb)) return NotImmune(playerid);
if(strfind(string, "/") == 0) CallLocalFunction("OnPlayerCommandReceived", "is", playerb, string);
else SendPlayerMessageToAll(playerb, string);
format(string, sizeof(string), "%s sent a fake message from %s: %s", RPN(playerid), RPN(playerb), string);
Log("logs/fakechat.log", string);
return 1;
}
PHP код:
if(strfind(string, "/") == 0) CallLocalFunction("OnPlayerCommandReceived", "is", playerb, string);
else SendPlayerMessageToAll(playerb, string);