Gressie
Мастер
PHP:
else if(strcmp(cmd, "/jail", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "(( Введите: /jail [id] [минуты], /jail id 0 - вытащить из тюрьмы ))");
if (dostup[playerid] != true) return ShowPlayerDialog(playerid,1233,DIALOG_STYLE_INPUT,"Доступ администратора","Введите пароль от административной панели","Ок","Отмена");
new playa;
new money;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
money = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 2)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Вы посадили %s в тюрьму", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
Delgun(playa);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
SetPlayerInterior(playa, 6);
SetPlayerPos(playa,264.1425,77.4712,1001.0391);
SetPlayerFacingAngle(playa, 263.0160);
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pMestoJail] = 1;
PlayerInfo[playa][pJailTime] = money*60;
format(string, sizeof(string), "Вы были посажены в тюрьму администратором на %d минут(ы)", money);
SendClientMessage(playa, COLOR_LIGHTRED, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Вы не уполномочены использовать эту команду");
}
return true;
}
