How to write a command as someone else
#3

I tried this:
PHP код:
CMD:fakechat(playeridparams[])
{
    if(!
IsAllowed(playerid5)) return NoAuth(playerid);
    new 
playerbstring[128];
    if(
sscanf(params"us[128]"playerbstring)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /fakechat [playerid] [text]");
    if(!
IsPlayerConnected(playerb) || playerid == playerb) return SendClientMessage(playeridCOLOR_WHITE"Invalid ID.");
    if(
IsImmune(playeridplayerb)) return NotImmune(playerid);
    if(
strfind(string"/") == 0CallLocalFunction("OnPlayerCommandReceived""is"playerbstring);
    else 
SendPlayerMessageToAll(playerbstring);
    
format(stringsizeof(string), "%s sent a fake message from %s: %s"RPN(playerid), RPN(playerb), string);
    
Log("logs/fakechat.log"string);
    return 
1;

Focus:
PHP код:
if(strfind(string"/") == 0CallLocalFunction("OnPlayerCommandReceived""is"playerbstring);
    else 
SendPlayerMessageToAll(playerbstring); 
The command is simply not sent ...
Reply


Messages In This Thread
How to write a command as someone else - by NeXoR - 20.10.2016, 17:33
Re: How to write a command as someone else - by oMa37 - 20.10.2016, 18:24
Re: How to write a command as someone else - by NeXoR - 20.10.2016, 19:13
Re: How to write a command as someone else - by ThatFag - 20.10.2016, 19:21
Re: How to write a command as someone else - by oMa37 - 20.10.2016, 19:35
Re: How to write a command as someone else - by SickAttack - 20.10.2016, 19:53
Re: How to write a command as someone else - by NeXoR - 20.10.2016, 19:54

Forum Jump:


Users browsing this thread: 1 Guest(s)