1 // This is a client command in the "g_cmds.c" file ( ClientCommand(int) )
 2 else if ( Q_stricmp(cmd, "uptime") == 0 )
 3 {
 4 	char buff[100];
 5   
 6 	// If you want your mod to be backwards compatible without JK2MF you need to check if it is available before every
 7 	// call to a JK2MF specific function.
 8 	if ( !JK2MFApiAvailable() )
 9 	{
10 		trap_SendServerCommand(clientNum, va("print \"The server needs at least JK2MF %s to make this command available.\n\"", JK2MFMINVERSION));
11 		return;
12 	}
13   
14 	trap_JK2MF_GetUptimeString(buff, sizeof(buff));  
15 	trap_SendServerCommand(clientNum, va("print \"%s ( %i seconds )\n\"", buff, trap_JK2MF_GetUptimeSeconds()));
16 }