void GScr_AddScriptCommand()
{

    if(Scr_GetNumParam() != 2)
    {
        Scr_Error("Usage: addScriptCommand <commandname> <default powerpoints is number between 1 and 100>");
        return;
    }
    const char* command = Scr_GetString(0);
    int defaultpower = Scr_GetInt(1);

    if(command[0] == '\0')
    {
        Scr_Error("addScriptCommand: empty command");
        return;
    }

    Cmd_AddCommandGeneric(command, NULL, GScr_ScriptCommandCB, qfalse, defaultpower);

}
Exemplo n.º 2
0
qboolean Cmd_AddHCommand( const char *cmd_name, const char* helptext, xcommand_t function, int power )
{
    return Cmd_AddCommandGeneric( cmd_name, NULL, function, qtrue, power );
}
Exemplo n.º 3
0
qboolean Cmd_AddCommand( const char *cmd_name, xcommand_t function )
{
    return Cmd_AddCommandGeneric( cmd_name, NULL, function, qtrue, 100);
}