Marks CMD as invalid
#1

Hey guys, I scripted a faction MOTD command
Everything works good when I type the command, but it still tells me that the CMD is invalid

Code:
PHP код:
CMD:adjustfacmotd(playeridparams[])
{
    new 
motdstring[128];
    if(!
IsPlayerLoggedIn(playerid) || PlayerInfo[playerid][pAsshole] == 1) return SendClientMessage(playeridCOLOR_GREY"You are not allowed to use this command.");
    if(!
PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playeridCOLOR_GREY"You are not a faction leader.");
    if(
sscanf(params"s[128]"motd)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /adjustfacmotd [MOTD]");
    
format(FacInfo[PlayerInfo[playerid][pFac]][facMOTD], 128"%s"motd);
    
format(stringsizeof(string), " %s %s has edited the faction Message of The Day."RPFRN(playerid), RPN(playerid));
    
SendPlayerFactionMessage(playerid0COLOR_RADIOstring);
    
format(stringsizeof(string), " %s"motd);
    
SendPlayerFactionMessage(playerid0COLOR_RADIOstring);
    
SendClientMessage(playeridCOLOR_WHITE"You have edited your faction's MOTD");
    return 
1;

CommandPerformed:
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    new 
string[128];
    
format(stringsizeof(string), "[cmd] [%s]: %s"RPN(playerid), cmdtext);
     print(string);
    if(!
success)
    {
        
SendClientMessage(playeridCOLOR_RED"** The command you attempt to use doesn't exist on our server.");
    }
    return 
1;

Reply


Messages In This Thread
Marks CMD as invalid - by NeXoR - 17.04.2016, 10:25
Re: Marks CMD as invalid - by Konstantinos - 17.04.2016, 10:30
Re: Marks CMD as invalid - by NeXoR - 17.04.2016, 10:36
Re: Marks CMD as invalid - by Konstantinos - 17.04.2016, 10:39
Re: Marks CMD as invalid - by NeXoR - 17.04.2016, 11:22

Forum Jump:


Users browsing this thread: 2 Guest(s)