- Регистрация
- 24 Ноя 2011
- Сообщения
- 165
- Лучшие ответы
- 0
- Репутация
- 13
Здарова всем)))
У меня мод SenseGame
Короче я сажаю игрока в кпз или даю мут на время
А время прохОДИТ А У ИГРОКА МУТ и он еще в кпз что делать вот строки!!!
Помогите плиз не обижу +
У меня мод SenseGame
Короче я сажаю игрока в кпз или даю мут на время
А время прохОДИТ А У ИГРОКА МУТ и он еще в кпз что делать вот строки!!!
PHP:
if(strcmp(cmd, "/mute", true) == 0)//Заткнуть игрока на время
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, " Подсказка: /mute [ID игрока] [минуты] [причина]");
return 1;
}
new playa;
new vremya;
playa = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
vremya = strvalEx(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
if(vremya == 0)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " %s снял мут с %s.",sendername ,giveplayer);
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playa][pMuteTime] = 0;
PlayerInfo[playa][pMuted] = 0;
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, " Подсказка: /mute [ID игрока] [минуты] [причина]");
return 1;
}
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), " %s заткнул %s на %d минут(ы), причина: %s.",sendername, giveplayer, vremya, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[playa][pMuted] = 1;
PlayerInfo[playa][pMuteTime] = vremya*60;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Ты не можешь использовать эту команду!");
}
}
return 1;
}
PHP:
if(strcmp(cmd, "/jail", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Использование: /jail [playerid/PartOfName] [time(minutes)]");
return 1;
}
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);
ResetPlayerWeapons(playa);
WantedPoints[playa] = 0;
new rand = random(sizeof(LSPDSpawns));
SetPlayerInterior(playa, 6);
SetPlayerPos(playa, LSPDSpawns[rand][0], LSPDSpawns[rand][1], LSPDSpawns[rand][2]);
PlayerInfo[playa][pJailed] = 1;
PlayerInfo[playa][pJailTime] = money*60;
format(string, sizeof(string), " Вас посадил %s на %d минут.", sendername, money);
SendClientMessage(playa, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s посадил в КПЗ %s на %d минут.", sendername, giveplayer, money);
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " У вас недостаточно прав, чтобы использовать эту команду!");
}
}
return 1;
}