27.06.2014, 13:01
hello there, i got problem, i have the gm revolution survival and im intersted on that.. it has ban command but doesnt have unban, anyone can make unban cmd for it?
here is the code of ban cmd
+rep
here is the code of ban cmd
Код:
CMD:ban(playerid, params[]) { new giveplayerid, szReason[32]; if(sscanf(params, "us[32]", giveplayerid, szReason)) return SendClientMessage(playerid, RED, "[Database:]{FFFFFF} /ban [ID] [REASON]"); if(IsPlayerNPC(giveplayerid)) return SendClientMessage(playerid, RED, "[Database:]{FFFFFF} You cant kick npcs"); if(AccountInfo[playerid][pAdmin] >= 2) { if(giveplayerid != INVALID_PLAYER_ID) { new sendername[MAX_PLAYER_NAME], string[128], giveplayer[MAX_PLAYER_NAME]; GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, 128, "[Database:]{FFFFFF} [ADMIN] %s has banned %s! Reason: %s", sendername, giveplayer, szReason); SendClientMessageToAll(RED, string); Ban(giveplayerid); new Hour, Minute, Second; gettime(Hour, Minute, Second); format(string,sizeof(string),"[%02d:%02d:%02d]%s has banned %s! Reason:%s",Hour,Minute,Second,sendername,giveplayer, szReason); SaveIn("BanLog.txt",string); } } return 1; }