diff --git a/gamemodes/penls.pwn b/gamemodes/penls.pwn index b3341df..d2107cc 100644 --- a/gamemodes/penls.pwn +++ b/gamemodes/penls.pwn @@ -2351,7 +2351,7 @@ public OnPlayerConnect(playerid) { gPlayerAccount[playerid] = 0; SendClientMessageRus(playerid, COLOR_YELLOW, "СЕРВЕР: Введите /regnick чтобы зарегистрироваться или /help для помощи"); - ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Welcome", " Добро пожаловать к нам на сервер \nВведите /regbick [ваш пароль] что бы зарегистрироваться на нашем сервере", "Ок", ""); + ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Welcome", " Добро пожаловать к нам на сервер \nВведите /regnick [ваш пароль] что бы зарегистрироваться на нашем сервере", "Ок", ""); } return 1; } @@ -7667,7 +7667,7 @@ public LoadPlayer(loaderid,const string[]) new string2[64]; new loaded = loaderid; new valtmp[128]; - format(string2, sizeof(string2), "%s.cer", strlower(string)); + format(string2, sizeof(string2), "%s.cer", (string)); new File: file = fopen(string2, io_read); if (file) { @@ -7722,7 +7722,7 @@ public SavePlayer(loaderid,const string[]) { new string3[32]; new saved = loaderid; - format(string3, sizeof(string3), "%s.cer", strlower(string)); + format(string3, sizeof(string3), "%s.cer", (string)); new File: pFile = fopen(string3, io_write); if (pFile) { @@ -7786,7 +7786,7 @@ public OnPlayerLogin(playerid,const string[]) } */ GetPlayerName(playerid, playername2, sizeof(playername2)); - format(string2, sizeof(string2), "%s.cer", strlower(playername2)); + format(string2, sizeof(string2), "%s.cer", (playername2)); new File: file = fopen(string2, io_read); if (file) { @@ -7948,7 +7948,7 @@ public PlayerUpdate(playerid) new string3[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); - format(string3, sizeof(string3), "%s.cer", strlower(playername3)); + format(string3, sizeof(string3), "%s.cer", (playername3)); new File: pFile = fopen(string3, io_write); if (gdebug){printf("DEBUG PlayerUpdate(%d)8.5", playerid);} if (pFile) @@ -8026,14 +8026,14 @@ public OnPlayerRename(name[],string[],playerid) if (gdebug >= 1){printf("DEBUG OnPlayerRename(%d)", playerid);} if (gPlayerLogged[playerid] != 0) { - new File: pFile = fopen(strlower(string), io_write); + new File: pFile = fopen((string), io_write); if (gdebug){printf("DEBUG PlayerUpdate(%d)8.5", playerid);} if (pFile) { new var[32]; format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var); fclose(pFile); - new File: hFile = fopen(strlower(string), io_append); + new File: hFile = fopen((string), io_append); // PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); format(var, 32, "%d pCash\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var); format(var, 32, "%d pAccount\n",PlayerInfo[playerid][pAccount]);fwrite(hFile, var); @@ -8616,133 +8616,6 @@ public OnPlayerCommandText(playerid, cmdtext[]) } return 1; } - - if(strcmp(cmd,"/unbanip",true)==0) - { - if(PlayerInfo[playerid][pAdmin] >= 3) - { - tmp = strtok(cmdtext,idx); - if(!strlen(tmp)) - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ИСПОЛЬЗОВАНИЕ: /unbanip [ip игрока]"); - return 1; - } - - new ipidx = 0; - new ip[8]; - new tmp2[64]; - - tmp2 = strtok(tmp,ipidx, "."); - if(strlen(tmp2) == 0) - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - if(strcmp(tmp2, "*", true) == 0) - { - ip[4] = 255; - ip[0] = 0; - } - else if((ip[0] = strval(tmp2)) >= 0 && (ip[0] = strval(tmp2)) <= 255) - { - ip[4] = ip[0]; - } - else - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - - tmp2 = strtok(tmp,ipidx, "."); - if(strlen(tmp2) == 0) - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - if(strcmp(tmp2, "*", true) == 0) - { - ip[5] = 255; - ip[1] = 0; - } - else if((ip[1] = strval(tmp2)) >= 0 && (ip[1] = strval(tmp2)) <= 255) - { - ip[5] = ip[1]; - } - else - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - tmp2 = strtok(tmp,ipidx, "."); - if(strlen(tmp2) == 0) - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - if(strcmp(tmp2, "*", true) == 0) - { - ip[6] = 255; - ip[2] = 0; - } - else if((ip[2] = strval(tmp2)) >= 0 && (ip[2] = strval(tmp2)) <= 255) - { - ip[6] = ip[2]; - } - else - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - tmp2 = strtok(tmp,ipidx, "."); - if(strlen(tmp2) == 0) - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - if(strcmp(tmp2, "*", true) == 0) - { - ip[7] = 255; - ip[3] = 0; - } - else if((ip[3] = strval(tmp2)) >= 0 && (ip[3] = strval(tmp2)) <= 255) - { - ip[7] = ip[3]; - } - else - { - SendClientMessageRus(playerid,COLOR_GRAD1,"ПОДСКАЗКА: неправильно введен IP адрес."); - return 1; - } - new s1[5]; - new s2[10]; - new s3[15]; - new s4[30]; - for(new i = ip[0]; i<=ip[4]; i++) - { - format(s1, sizeof(s1), "%d.", i); - for(new j = ip[1]; j<=ip[5]; j++) - { - format(s2, sizeof(s2), "%s%d.", s1, j); - for(new k = ip[2]; k<=ip[6]; k++) - { - format(s3, sizeof(s3), "%s%d.", s2, k); - for(new l = ip[3]; l<=ip[7]; l++) - { - format(s4,sizeof(s4),"unbanip %s%d", s3, l); - print(s4); - SendRconCommand(s4); - } - } - } - } - SendRconCommand("reloadbans"); - GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); - GetPlayerName(playerid, sendername, sizeof(sendername)); - format(string, 256, "AdmWarning: %s разбанил IP %s", sendername,tmp); - ABroadCast(COLOR_YELLOW,string,1, CHAT_ADM_WARN); - } - return 1; - } //-------------------------------[Pay]-------------------------------------------------------------------------- if(strcmp(cmd, "/pay", true) == 0) @@ -8893,7 +8766,7 @@ public OnPlayerCommandText(playerid, cmdtext[]) GameTextForPlayerRus(playerid, "~w~Now Select a character and type /login ", 10000, 3);*/ strmid(PlayerInfo[playerid][pPassword], tmp, 0, strlen(cmdtext), 255); GetPlayerName(playerid, playername, sizeof(playername)); - format(string, sizeof(string), "%s.cer", strlower(playername)); + format(string, sizeof(string), "%s.cer", (playername)); PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid); new File: file = fopen(string, io_read); if (file) @@ -10395,6 +10268,12 @@ public OnPlayerCommandText(playerid, cmdtext[]) SendClientMessageRus(playerid, TEAM_CYAN_COLOR, "Вы не можете говорить, т.к. были заткнуты"); return 0; } + if(Muted[playerid] != 0) + { + format(string, sizeof(string), "Вы заткнуты отсавшиеся время: %d(сек)",Muted[playerid]); + SendClientMessage(playerid, COLOR_RED, string); + return 0; + } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) @@ -10543,6 +10422,12 @@ public OnPlayerCommandText(playerid, cmdtext[]) SendClientMessageRus(playerid, COLOR_GRAD2, "USAGE: /me [action]"); return 1; } + if(Muted[playerid] != 0) + { + format(string, sizeof(string), "Вы заткнуты отсавшиеся время заглушки %d(сек)",Muted[playerid]); + SendClientMessage(playerid, COLOR_RED, string); + return 0; + } format(string, sizeof(string), "* %s %s", sendername, result); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); printf("%s", string); @@ -10570,6 +10455,12 @@ public OnPlayerCommandText(playerid, cmdtext[]) SendClientMessageRus(playerid, COLOR_GRAD2, "ИСПОЛЬЗОВАНИЕ: (/l)ocal [local chat]"); return 1; } + if(Muted[playerid] != 0) + { + format(string, sizeof(string), "Вы заткнуты отсавшиеся время заглушки %d(сек)",Muted[playerid]); + SendClientMessage(playerid, COLOR_RED, string); + return 0; + } format(string, sizeof(string), "%s говорит: %s", sendername, result); ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); printf("%s", string); @@ -10597,6 +10488,12 @@ public OnPlayerCommandText(playerid, cmdtext[]) SendClientMessageRus(playerid, COLOR_GRAD2, "ИСПОЛЬЗОВАНИЕ: (/s)hout [local chat]"); return 1; } + if(Muted[playerid] != 0) + { + format(string, sizeof(string), "Вы заткнуты отсавшиеся время заглушки %d(сек)",Muted[playerid]); + SendClientMessage(playerid, COLOR_RED, string); + return 0; + } format(string, sizeof(string), "%s кричит: %s!!", sendername, result); ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2); printf("%s", string); @@ -17140,22 +17037,27 @@ public OnPlayerCommandText(playerid, cmdtext[]) } if(strcmp(cmd, "/mute", true) == 0) { - if(PlayerInfo[playerid][pAdmin] >= 1) + if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_RED,"У вас не прав на использование даной команды"); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) - return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); + return + SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); new id = strval(tmp); tmp = strtok(cmdtext, idx); new time = strval(tmp); if(!strlen(tmp) || !IsPlayerConnected(id)) - return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); + return + SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); if(!strlen(cmdtext[idx])) - return SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); + return 1; + SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /mute [playerid] [кол-во минут] [причина]"); format(string, sizeof(string), "Вы заткнули %s на %d(минут) с причиной %s", GN(id),time, cmdtext[idx]); SendClientMessage(playerid, COLOR_WHITE, string); - format(string, sizeof(string), "Вы были заткнуты админовм %s на %d(минут) Причина: %s", GN(playerid),time, cmdtext[idx]); + format(string, sizeof(string), "Вы были заткнуты админом %s на %d(минут(ы)) Причина: %s", GN(playerid),time, cmdtext[idx]); SendClientMessage(id, COLOR_WHITE, string); + format(string, sizeof(string), "AdmCmd: %s был заткнут админом %s на %d(минут) Причина %s",GN(id),GN(playerid),time,cmdtext[idx]); + SendClientMessageToAllRus(COLOR_RED, string); Muted[id] = time*60; return 1; } @@ -20211,5 +20113,3 @@ if(dialogid == 6) } } } - -