Unknown Command
#1

I;ve implemented this code:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(
IsPlayerAdmin(playerid))
    {
        if(!
strcmp("/gotomb"cmdtexttrue))
        {
            
SetPlayerPos(playeridMoneyBagPos[0], MoneyBagPos[1] +3MoneyBagPos[2]);
            return 
SendClientMessage(playerid, -1"You have been {FF0000}teleported {FFFFFF}to the {33FF66}money bag");
        }
        if(!
strcmp("/startmb"cmdtexttrue)) return MoneyBag();
        if(!
strcmp("/togglemb"cmdtexttrue))
        {
            if(
Timer[0] == 0)
            {
                
KillTimer(Timer[1]);
                
Timer[0] = 1;
                
SendClientMessage(playerid, -1"Money bag turned {FF0000} off!");
                return 
1;
            }
            if(
Timer[0] == 1)
            {
                
Timer[1] = SetTimer("MoneyBag"MB_DELAYtrue);
                
Timer[0] = 0;
                
SendClientMessage(playerid, -1"Money bag turned {33FF66} on!");
                return 
1;
            }
            return 
1;
        }
    }
    if(!
strcmp("/moneybag"cmdtexttrue))
    {
        new 
string[150];
        if(!
MoneyBagFoundformat(stringsizeof(string), "**The {33FF66}Money Bag has been {FF0000}hidden in {FFFF66}%s!"MoneyBagLocation);
        if(
MoneyBagFoundformat(stringsizeof(string), "**The {33FF66}Money Bag is {FF0000} not running!");
        return 
SendClientMessage(playerid, -1string);
    }
    if(!
strcmp("/mb"cmdtexttrue))
    {
        new 
string[150];
        if(!
MoneyBagFoundformat(stringsizeof(string), "**The {33FF66}Money Bag has been {FF0000}hidden in {FFFF66}%s!"MoneyBagLocation);
        if(
MoneyBagFoundformat(stringsizeof(string), "**The {33FF66}Money Bag is {FF0000} not running!");
        return 
SendClientMessage(playerid, -1string);
    }
    if(!
strcmp("/teleport"cmdtexttrue))
    {
         
SetPlayerPos(playerid, -1967.83652956.982312.9375);
         return 
1;
    }
    return 
0;

But when i run the game ,i type one of the command it says Server: Unknown Command ?,i got no error while compiling....

Where is the problem?
Reply


Messages In This Thread
Unknown Command - by Cyboorg - 22.06.2017, 10:29
Re: Unknown Command - by Abagail - 22.06.2017, 14:42
Re: Unknown Command - by Astralis - 22.06.2017, 15:24
Re: Unknown Command - by Cyboorg - 23.06.2017, 09:30
Re: Unknown Command - by rolex - 23.06.2017, 14:15
Re: Unknown Command - by HoussemGaming - 23.06.2017, 20:24
Re: Unknown Command - by Threshold - 23.06.2017, 22:17
Re: Unknown Command - by Meller - 23.06.2017, 22:56

Forum Jump:


Users browsing this thread: 1 Guest(s)