TTaKeMoWa |
Дата: Понедельник, 04.06.2012, 15:40 | Сообщение # 1
|
Боец
Сообщений: 118
Статус: Offline
|
http://s2.ipicture.ru/uploads/20120604/pjk7IQFL.png
Код:
Code else if(strcmp(cmd, "/cuff", true) == 0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 21) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Ведите: /cuff [id]"); giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if(IsACop(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете надеть наручники на законника !"); if(PlayerCuffed[giveplayerid] > 0) return SendClientMessage(playerid, COLOR_GREY, "игрок уже в наручниках!"); if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Вы не можете надеть наручники на самого себя!"); return 1; } if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pMember] == 21 || IsAArm(playerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "На вас надели наручники %s.", sendername); SendClientMessage(giveplayerid, 0x6495EDFF, string); format(string, sizeof(string), "Вы надели наручники на %s.", giveplayer); SendClientMessage(playerid, 0x6495EDFF, string); format(string, sizeof(string), "%s надел(а) на %s наручники.", sendername ,giveplayer); SetPlayerAttachedObject(giveplayerid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000); SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_CUFFED); ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); 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; } else if(strcmp(cmd, "/uncuff", true) == 0) { if(PlayerInfo[playerid][pMember] == 2 || IsACop(playerid)||IsAArm(playerid) ) { tmp = strtok(cmdtext, idx); if(!strlen(tmp))return SendClientMessage(playerid, COLOR_WHITE, "Введите: /uncuff [id]"); giveplayerid = ReturnUser(tmp); if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Вы не можете снять наручники с самого себя!"); return 1; } if(PlayerCuffed[giveplayerid]) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), " %s снял наручники.", sendername); SendClientMessage(giveplayerid, 0x6495EDFF, string); format(string, sizeof(string), "Вы сняли наручники с %s.", giveplayer); SendClientMessage(playerid, 0x6495EDFF, string); SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_NONE); RemovePlayerAttachedObject(giveplayerid,0); TogglePlayerControllable(giveplayerid, 1); PlayerCuffed[giveplayerid] = 0; } 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; }
Автор: Armstrrrong
[img]http://cheat-master.ru/_fr/1/9873422.png[/img]
|
|
|
|
Danny_Marcelo |
Дата: Суббота, 25.06.2016, 21:44 | Сообщение # 2
|
Боец
Сообщений: 282
Статус: Offline
|
Полезная команда. Возьму себе. Единственная просьба, перезалей скриншот. Не все по коду поймут)
|
|
|
|