cmd does not exists

Started by Cool, May 25, 2016, 10:56 AM

Previous topic - Next topic

Cool

its doom clanstats i try it on blank script but the cmd not working all things works perfect
function onPlayerCommand( player, command, text )
{
  if ( cmd == "clanstats" )
    {
        if( !text ) MessagePlayer(">> Use: /c clanstats <Clan Name> (Example: /c clanstats [MK]. Using only text won't work, Use clan symbols with it)", player );
        else
        {
            local cname = FindClanTag( text );
            if( cname )
            {
                local ckills = GetSQLColumnData( QuerySQL( cs, "SELECT Kills FROM Clan WHERE Name='" + cname + "'" ), 0 );
                if ( ckills )
                {
                Message( ">> " + text + " Has total kills of: " + ckills );
                }
                else return 0;
            }
        }   
    }
}

KAKAN

use this line: function onPlayerCommand( player, cmd, text )
oh no

Cool

#2
Thank you!