Manning
Новичок
PHP:
if(strcmp(cmd,"/frisk",true)==0)
{
if(IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Вы не член Полиции/ФБР/Армии!");
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "{F74848}» Введите: {FFFFFF} /frisk [id]");
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) return SendClientMessage(playerid, COLOR_GREY, "Вы не можете обыскать себя!");
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new text1[20], text2[20];
if(PlayerInfo[giveplayerid][pDrugs] > 0)
{
text1 = "| Наркотики.";
}
else
{
text1 = "| Пустой карман.";
}
if(PlayerInfo[giveplayerid][pMats] > 0)
{
text2 = "| Материалы.";
}
else
{
text2 = "| Пустой карман.";
}
if(PlayerInfo[giveplayerid][pCash] > 0)
{
text2 = "| Деньги.";
}
else
{
text2 = "| Пустой карман.";
}
format(string, sizeof(string), "--== Вещи %s ==--", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "%s.", text1);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "%s.", text2);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "%s.", text2);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "%s обыскал %s", sendername ,giveplayer);
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Этого игрока рядом с вами нет !");
return true;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Игрок не найден!");
return true;
}
}
return true;
}
