/kicks [ID] & /bans [ID] -
Super_Panda - 27.11.2011
Is it possible to make that??
To access to kick & Ban logg..??
Re: /kicks [ID] & /bans [ID] -
Kostas' - 27.11.2011
What do you use for the saving part, dini, y_ini or MYSQL?
Re: /kicks [ID] & /bans [ID] - Sinc - 27.11.2011
Quote:
Originally Posted by Kostas'
What do you use for the saving part, dini, y_ini or MYSQL?
|
It matters not what he uses, file handling is done with file functions.
Re: /kicks [ID] & /bans [ID] -
Kakioshe22 - 27.11.2011
I got one myselfe using dini files.. if you want i can post here
Re: /kicks [ID] & /bans [ID] -
Kostas' - 27.11.2011
pawn Код:
// At The Top
#define LOG_BAN
#define LOG_KICK
// Kick Command
CMD: kick(playerid, params[])
{
// Code Here
#if defined LOG_KICK
LogKick(playerid, id, params);
#endif
return 1;
}
// Ban Command
CMD: ban(playerid, params[])
{
// Code Here
#if defined LOG_BAN
LogBan(playerid, id, params);
#endif
return 1;
}
pawn Код:
stock LogBan(playerid, id, text[])
{
new File:gFile, year, month, day, hour, minute, second, string[256], nick[MAX_PLAYER_NAME];
getdate(year, month, day);
gettime(hour, minute, second);
if(!fexist("Ban_Log.txt"))
{
gFile = fopen("Ban_Log.txt", io_write);
fclose(gFile);
}
gFile = fopen("Ban_Log.txt", io_append);
format(string, sizeof(string), "[Date: %02d/%02d/%02d || Time: %02d:%02d:%02d] Ban Name: %s (%d)", day, month, year, hour, minute, second, nick, id);
fwrite(gFile, string);
fclose(gFile);
return 1;
}
stock LogKick(playerid, id, text[])
{
new File:gFile, year, month, day, hour, minute, second, string[256], nick[MAX_PLAYER_NAME];
getdate(year, month, day);
gettime(hour, minute, second);
if(!fexist("Kick_Log.txt"))
{
gFile = fopen("Kick_Log.txt", io_write);
fclose(gFile);
}
gFile = fopen("Kick_Log.txt", io_append);
format(string, sizeof(string), "[Date: %02d/%02d/%02d || Time: %02d:%02d:%02d] Kick Name: %s (%d)", day, month, year, hour, minute, second, nick, id);
fwrite(gFile, string);
fclose(gFile);
return 1;
}
Re: /kicks [ID] & /bans [ID] -
legho - 27.11.2011
Much easier way for noobs to create commands like this use ****** Scanff simple.
If you need any help with this i will be happy to help!