Kanowka |
Дата: Четверг, 15.09.2016, 23:44 | Сообщение # 1
|
Новичок
Сообщений: 12
Статус: Offline
|
Здравствуйте. После ввода команды /warn, /ban, /kick, команда срабатывает, но сообщение в чате не выводится ни игроку, ни администратору, просто игроку пишет Server closed .... Прошу подробно объяснить, как исправить данную проблему, надеюсь на вашу помощь
Вот Код Команды:
Код CMD:warn(playerid, params[]) { if(PlayerInfo[playerid][bAdmin] < 5) return 1; if(gAdminReason[playerid][ADMIN_WARN]) return SendClientMessage(playerid, -1, ""#net"Îñíîâàòåëü çàïðåòèë Âàì ïîëüçîâàòüñÿ ýòîé êîìàíäîé!"); if(sscanf(params,"ds[100]",params[0],params[1])) return SendClientMessage(playerid, COLOR_WHITE, ""#information"Ââåäèòå: /warn [id] [ïðè÷èíà]"); if(!IsPlayerConnected(params[0])) return SendClientMessage(playerid, -1, ""#net"×åëîâåê íå íàéäåí!"); if(PlayerInfo[params[0]][bAdmin] > PlayerInfo[playerid][bAdmin]) return SendClientMessage(playerid, -1, ""#net"Àäìèíèñòðàòîðà íåëüçÿ çàâàðíèòü."); if(PlayerInfo[params[0]][bAdmin] > 6) return SendClientMessage(playerid, -1, ""#net"Àäìèíèñòðàòîð 7 ëâë íå ìîæåò áûòü çàâàðàíåí!"); if(!strcmp(PlayerInfo[params[0]][pNames], FD1, true) || !strcmp(PlayerInfo[params[0]][pNames], FD2, true)) return SendClientMessage(playerid, -1, ""#net"Çàïðåùåíî çàâàðíèòü ðàçðàáîò÷èêà!"); if(!Reklama(playerid, params[1])) return 1; PlayerInfo[params[0]][pWarns] ++; UpdatePlayerData(params[0],"pWarns",PlayerInfo[params[0]][pWarns]); PlayerInfo[params[0]][punWarnstime] = gettime() + 7*86400; UpdatePlayerData(params[0],"punWarnstime",PlayerInfo[params[0]][punWarnstime]); PlayerInfo[params[0]][pMember] = 0; PlayerInfo[params[0]][pLeader] = 0; PlayerInfo[params[0]][pJob] = 0; mysql_format(connects, string, 164, "UPDATE `accounts` SET `pMember` = '0', `pLeader` = '0', `pJob` = '0' WHERE `id` = '%i'", PlayerInfo[params[0]][pID]); mysql_empty(connects, string); if(PlayerInfo[params[0]][pWarns] >= 3) { format(string,MAX_STR, "%s %s çàáàíèë %s [3/3]. Ïðè÷èíà: %s ", PlayerAdmin[PlayerInfo[playerid][bAdmin]-1],PlayerInfo[playerid][pNames],PlayerInfo[params[0]][pNames], params[1]); SendAdminMessage(COLOR_LIGHTRED, string); format(string,MAX_STR, "- Íèê: [%s] IP: [%s]",PlayerInfo[params[0]][pNames],PlayerInfo[params[0]][pIP]); ABroadCast(COLOR_LIGHTRED,string,1); PlayerInfo[params[0]][pJob] = 0; UpdatePlayerData(params[0], "pJob", 0); PlayerInfo[params[0]][pWarns] = 0; PlayerInfo[params[0]][punWarnstime] = 0; mysql_format(connects, string, 164, "UPDATE `accounts` SET `pWarns` = '0', `punWarnstime` = '0' WHERE `id` = '%i'", PlayerInfo[params[0]][pID]); mysql_empty(connects, string); new query_mysql[264], data[16], ip[16]; GetPlayerIp(params[0],ip,sizeof(ip)); SetPVarInt(playerid, "UnBanDate", gettime() + 604800), format(data,sizeof(data), "%s",date("%dd.%mm.%yyyy",gettime())); mysql_format(connects,query_mysql,sizeof(query_mysql), "INSERT INTO `BanList` (`Nick`,`Admin`, `IP`, `Date` ,`Reason`,`Days`,`UnbanDate`,`Status`) VALUES ('%s','%s','%s','%s','%s','7','%d','1')", PlayerInfo[params[0]][pNames], PlayerInfo[playerid][pNames], ip, data, params[1], GetPVarInt(playerid, "UnBanDate")); mysql_empty(connects, query_mysql); KickEx(params[0]);
gAdmin[playerid][ADMIN_BAN] += 1; return 1; } format(string,200, "%s %s âûäàë ïðåäóïðåæäåíèå %s (%d/3). Ïðè÷èíà: %s", PlayerAdmin[PlayerInfo[playerid][bAdmin]-1], PlayerInfo[playerid][pNames], PlayerInfo[params[0]][pNames], PlayerInfo[params[0]][pWarns], params[1]); SendAdminMessage(COLOR_LIGHTRED, string); SendClientMessage(params[0], COLOR_LIGHTRED, "- Åñëè âû ñ÷èòàåòå ÷òî ïðåäóïðåæäåíèå âûäàíî ëîæíî, òî îïðîâåðãíèòå ýòî ïðåäóïðåæäåíèå íà ôîðóìå, íàïèñàâ íà àäìèíèñòðàòîðà æàëîáó. "NAME_SAIT""); SendClientMessage(params[0], COLOR_LIGHTRED, "- Îäíî ïðåäóïðåæäåíèå ñíèìàåòñÿ àâòîìàòè÷åñêè ïîñëå 10 îòûãðàííûõ ÷àñîâ"); format(string,512,"\t\t\t"SERVER"Âàø àêêàóíò çàâàðíåí.\nÇàâàðíèë: "WHITE"%s\n"SERVER"Çàâàðíåí: "WHITE"%s\n"SERVER"Ïðè÷èíà âàðíà: "WHITE"%s\n"SERVER"Åñëè âû ñ÷èòàåòå ÷òî âàðí âûäàí ëîæíî, ñîîáùèòå ýòî ãëàâíîìó àäìèíèñòðàòîðó",PlayerInfo[playerid][pNames],PlayerInfo[params[0]][pNames],params[1]); SPD(params[0],228,DIALOG_STYLE_MSGBOX,""SERVER"Âàðí àêêàóíòà",string,"Äà",""); KickEx(params[0]); gAdmin[playerid][ADMIN_WARN] += 1; return 1; }
Сообщение отредактировал Kanowka - Пятница, 16.09.2016, 02:32 |
|
|
|