WTFCS Community | Gaming community @ since 2011

Full Version: rLogs | Server Logs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Rock's Log Include
Scripted by Rock

Informatii:
Este un include ce iti permite sa salvezi log-uri pentru orice doresti din server.
Ex: kick: motiv, timp, data, admin, player.
Toate astea se salveza intr-un fisier setat de tine.

Mod de folosire:
Eu am dat un exemplu foarte simplu pentru voi sa intelegi cam cum sta treaba.
Code:
------------------------------------------------------------------------------------------------------------
#include < a_samp >
#include <  rLogs >
#include <  zcmd  >

new r_var[ 5 ] = "Rock";

CMD:createlog( playerid, params[ ] )
{
   new r_g_log[ 15 ];
   if( !LogExist( "Test.log" ) ) // Check if "Test.log" doesen't exist.
   {
      CreateLog( "Test.log" ); // Create "Test.log"

      format( r_g_log, sizeof( r_g_log ), "Test Log: %s", r_var ); // format string before using "WriteLog"
      WriteLog( "Test.log", r_g_log ); // Write in "Test.log" formated string, in my case "r_g_log"
   }

   return 1;
}

CMD:readlog( playerid, params[ ] )
{
   ReadLog( "Test.log" ); // Read "Test.log", text will be displayed in console.

   return 1;
}

CMD:deletelog( playerid, params[ ] )
{
   DeleteLog( "Test.log" ); // Delete "Test.log"

   return 1;
}
------------------------------------------------------------------------------------------------------------

Download:
You are not allowed to view links. Register or Login to view.
You are not allowed to view links. Register or Login to view.