22.03.2014, 11:00
So guys i have a pretty simple banning system although how it could be possible to save time date etc on the folder also is it right do i have any mistake?
no errors just not to waste time
I want to save date,time etc... how it could be possible.. Thanks.
pawn Код:
CMD:ban(playerid,params[])
{
new id,reason[70],string[120],gname[MAX_PLAYER_NAME];
if(pinfo[playerid][Admin] < 4) return 0;
if(pinfo[playerid][Admin] < pinfo[id][Admin]) return SendClientMessage(playerid,COLOR_RED," (ERROR): You can't ban a higher level admin!");
if(sscanf(params,"us[70]",id,reason)) return SendClientMessage(playerid, COLOR_RED," (ERROR): /ban [playerid] [reason]");
if(id == INVALID_PLAYER_ID || !IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, " (ERROR): The id/username you have typed is invalid!");
GetPlayerName(id,gname,sizeof(gname));
format(string,sizeof(string),"CCNR SYSTEM: %s has been banned from the server. Reason: %s",gname,reason);
SendClientMessageToAll(COLOR_PINK,string);
pinfo[id][Banned] = 1;
Ban(id);
return 1;
}
I want to save date,time etc... how it could be possible.. Thanks.