21.06.2012, 21:33
Hello there, I am creating a temporary banning system.
I would like to know, how could I set it so then the SQL system automatically set's a player's banned status to 0 when it's at the date the Admin entered? EG:
Thank you all for the help that you give me,
regards: iGetty.
I would like to know, how could I set it so then the SQL system automatically set's a player's banned status to 0 when it's at the date the Admin entered? EG:
pawn Код:
command(tban, playerid, params[])
{
if(AdminLevel[playerid] >= 1)
{
new id, day, month, year, reason[128], string[256];
if(sscanf(params, "uddds[128]", id, day, month, year, reason)) return SendClientMessage(playerid, WHITE, "Server: /tban [playerid/name] [day] [month] [year] [reason]");
{
//The SQL stuff here.
format(string, sizeof(string), "Administrator %s has Temporarily Banned %s. [Reason: %s]", pName(playerid), pName(id), reason);
SendClientMessageToAll(RED, string);
PlayerBanned[id] = 2;
SaveStats(id);
Kick(id);
}
}
else return SendClientMessage(playerid, GREY, "This command is for Administrators only.");
return 1;
}
regards: iGetty.