Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Баг с тайзером помогите

Статус
В этой теме нельзя размещать новые ответы.

CnoPTuK

Умник
После тайзера связат нельзя помогите
PHP:
    if(strcmp(cmd, "/tazer", true) ==0) 
    { 
        if(IsPlayerConnected(playerid)) 
        { 
            if(IsACop(playerid) || PlayerInfo[playerid][pMember] == 7 && PlayerInfo[playerid][pRank] == 3) 
            { 
                if(IsPlayerInAnyVehicle(playerid)) 
                { 
                    SendClientMessage(playerid, COLOR_GREY, " * Невозможно использовать в машине!"); 
                    return 1; 
                } 
                if(Tazer[playerid] == 1) 
                { 
                    SendClientMessage(playerid, COLOR_GREY, " * Перезарядка тайзера ещё не прошла!"); 
                    return 1; 
                } 
                new suspect = GetClosestPlayer(playerid); 
                if(IsPlayerConnected(suspect)) 
                { 
                    if(PlayerCuffed[suspect] > 0) 
                    { 
                        SendClientMessage(playerid, COLOR_GREY, " * Игрок уже в наручниках !"); 
                        return 1; 
                    } 
                    if(GetDistanceBetweenPlayers(playerid,suspect) < 5) 
                    { 
                        if(IsACop(suspect)) 
                        { 
                            SendClientMessage(playerid, COLOR_GREY, " * Вы не можете ударить тазером законника"); 
                            return 1; 
                        } 
                        if(IsPlayerInAnyVehicle(suspect)) 
                        { 
                            SendClientMessage(playerid, COLOR_GREY, " * Подозреваемый в машине, сначало вытащите его!"); 
                            return 1; 
                        } 
                        GetPlayerName(suspect, giveplayer, sizeof(giveplayer)); 
                        GetPlayerName(playerid, sendername, sizeof(sendername)); 
                        format(string, sizeof(string), " * Вас обездвижил электрошокером %s на 15 секунд.", sendername); 
                        SendClientMessage(suspect, COLOR_LIGHTBLUE, string); 
                        format(string, sizeof(string), " * Вы обездвижили электрошокером %s на 15 секунд.", giveplayer); 
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string); 
                        format(string, sizeof(string), " * %s выстрелил электрошокером в %s и обездвижил его на 15 секунд %s.", sendername ,giveplayer); 
                        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 
                        GameTextForPlayer(suspect, "schoked", 15000, 3); 
                        TogglePlayerControllable(suspect, 0); 
                        PlayerCuffed[suspect] = 1; 
                        PlayerCuffedTime[suspect] = 15; 
                        Tazer[playerid] = 1; 
                        TazerTime[playerid] = 10; 
                        //SetTimerEx("TazerUnTime", 15000, false, "i", playerid); 
                    } 
                    else 
                    { 
                        SendClientMessage(playerid, COLOR_GREY, " * Рядом с тобой никого нет!"); 
                        return 1; 
                    } 
                } 
            } 
            else 
            { 
                SendClientMessage(playerid, COLOR_GREY, " * Вы не Cop / FBI / National Guard !"); 
            } 
        }//not connected 
        return 1; 
    }


---------- Post added at 20:58 ---------- Previous post was at 20:41 ----------

PHP:
	if(strcmp(cmd, "/cuff", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsACop(playerid))
			{
			    tmp = strtok(cmdtext, idx);
				if(!strlen(tmp)) {
					SendClientMessage(playerid, COLOR_WHITE, " * Использование: /cuff [Playerid/PartOfName]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
			    if(IsPlayerConnected(giveplayerid))
				{
				    if(giveplayerid != INVALID_PLAYER_ID)
				    {
				        if(IsACop(giveplayerid))
				        {
				            SendClientMessage(playerid, COLOR_GREY, " * Вы не можете надеть наручники на законника !");
					        return 1;
				        }
					    if(PlayerCuffed[giveplayerid] > 0)
					    {
					        SendClientMessage(playerid, COLOR_GREY, " * Игрок уже в наручникам !");
					        return 1;
					    }
						if (ProxDetectorS(8.0, playerid, giveplayerid))
						{
						    if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, " * Вы не можете надеть наручники на самого себя!"); return 1; }
						    if(knocked[giveplayerid] == 1)
						    {
						        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
								GetPlayerName(playerid, sendername, sizeof(sendername));
						        format(string, sizeof(string), " * На вас надел наручник %s.", sendername);
								SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), " * Вы одели наручники на %s.", giveplayer);
								SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
								format(string, sizeof(string), " * %s одел(а) на %s наручники.", sendername ,giveplayer);
								ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
								GameTextForPlayer(giveplayerid, "~r~B ®APYЌ®…KAX", 2500, 3);
								TogglePlayerControllable(giveplayerid, 0);
								PlayerCuffed[giveplayerid] = 2;
								PlayerCuffedTime[giveplayerid] = 3600;
						    }
						    else
						    {
						        SendClientMessage(playerid, COLOR_GREY, " * Сначало нужно оглушить игрока !");
						        return 1;
						    }
						}
						else
						{
						    SendClientMessage(playerid, COLOR_GREY, " * Рядом с вами никого нет !");
						    return 1;
						}
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, " * Этот игрок в оффлайн!");
				    return 1;
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, " * Вы не Коп/ФБР/Армия !");
			}
		}
		return 1;
	}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу