Created
July 14, 2015 00:26
-
-
Save Dronr/0c5b76b33b220fdf7208 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CMD:clearwarns(playerid, params[]) | |
{ | |
if(!AcceptWrite(playerid)) return 1; | |
if(pData[playerid][IsAdmin] <= 6) return 1; | |
if(sscanf(params, "s[32]",params[0])) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /clearwarns [Nick]"); | |
format(httpquery,sizeof(httpquery),"SELECT * FROM `accounts` WHERE BINARY `Nick` = '%s'",params[0]); | |
mysql_query(httpquery); | |
mysql_store_result(); | |
if(!mysql_fetch_row_format(httpquery)) | |
return SendClientMessage(playerid,COLOR_GREY,"Файл-Аккаунт не найден"),mysql_free_result(); | |
AccWriteInt(params[0],"TWarns",0); | |
new findd = GetPlayerID(params[0]); | |
if(findd != 65535) | |
{ | |
pData[params[0]][TWarns] = 0; | |
SaveAkk(params[0]); | |
} | |
SendMes(playerid,COLOR_YELLOW," Admin: %s clearwarns: %s",getName(playerid),params[0]); | |
AdmLog(playerid, "unbaned", params[0]); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment