Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Cool on May 25, 2016, 10:56 AM

Title: cmd does not exists
Post by: Cool on May 25, 2016, 10:56 AM
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;
            }
        }   
    }
}
Title: Re: cmd does not exists
Post by: KAKAN on May 25, 2016, 11:06 AM
use this line: function onPlayerCommand( player, cmd, text )
Title: Re: cmd does not exists
Post by: Cool on May 25, 2016, 11:11 AM
Thank you!