/warn -
[HHT]DRON - 29.08.2011
But he did not kick a player for 3 warnings and the name of reason and nepishet how many warnings help please
Код:
{
new target, reason[128], pName[MAX_PLAYER_NAME], gName[MAX_PLAYER_NAME], string[128];
if (sscanf(params,"us[128]", target,reason)) return SendClientMessage(playerid,0xFF0000AA,"Используй: /warn [playerid] [Причина]");
if(level[playerid] >= 1)
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(target, gName, MAX_PLAYER_NAME);
SetPVarInt(target, "Warnings", GetPVarInt(target, "Warnings") + 1);
if(GetPVarInt(target, "Warnings") == 3)
{
format(string, sizeof string, "{FF0A00}-[Администратор: %s]- {FFFFFF} автоматический кик %s за 3 предупреждения, последнее: %s", pName, gName, reason);
SendClientMessageToAll(COLOR_YELLOW, string);
SendClientMessage(target, COLOR_RED, "Ты был кикнут за 3 предупреждения!");
format(string, sizeof string, "{FF0A00}-[Администратор: %s]- {FFFFFF} предупредил %s: %s [Кикнут]", pName, gName, reason);
Kick(target);
}
else
{
format(string, sizeof string, "{FF0A00}-[Администратор: %s]- {FFFFFF} предупреждил %s причина: %s", pName, gName, reason);
SendClientMessageToAll(COLOR_YELLOW,string);
format(string, sizeof string, "{FF0A00}-[Администратор: %s]- {FFFFFF} предупредил игрока: %s [Предупреждений %d/3]", pName, reason, GetPVarInt(target, "Warnings"));
SendClientMessage(target, COLOR_YELLOW, string);
format(string, sizeof string, "{FF0A00}-[Администратор: %s]- {FFFFFF} предупреждения %s: %s [%i/3]", pName, gName, reason, GetPVarInt(target, "Warnings"));
}
return 1;
}
Re: /warn -
=WoR=G4M3Ov3r - 29.08.2011
PHP код:
{
new target, reason[128], pName[MAX_PLAYER_NAME], gName[MAX_PLAYER_NAME], string[128];
if (sscanf(params,"us[128]", target,reason)) return SendClientMessage(playerid,0xFF0000AA,"Eniieucoe: /warn [playerid] [I?e?eia]");
if(IsPlayerConnected(giveplayerid))
{
if(level[playerid] >= 1)
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
GetPlayerName(target, gName, MAX_PLAYER_NAME);
SetPVarInt(target, "Warnings", GetPVarInt(target, "Warnings") + 1);
if(GetPVarInt(target, "Warnings") == 3)
{
format(string, sizeof string, "{FF0A00}-[Aaieieno?aoi?: %s]- {FFFFFF} aaoiiaoe?aneee eee %s ca 3 i?aaoi?a?aaiey, iineaaiaa: %s", pName, gName, reason);
SendClientMessageToAll(COLOR_YELLOW, string);
SendClientMessage(target, COLOR_RED, "Ou aue eeeioo ca 3 i?aaoi?a?aaiey!");
format(string, sizeof string, "{FF0A00}-[Aaieieno?aoi?: %s]- {FFFFFF} i?aaoi?aaee %s: %s [Eeeioo]", pName, gName, reason);
Kick(target);
}
else
{
format(string, sizeof string, "{FF0A00}-[Aaieieno?aoi?: %s]- {FFFFFF} i?aaoi?a?aee %s i?e?eia: %s", pName, gName, reason);
SendClientMessageToAll(COLOR_YELLOW,string);
format(string, sizeof string, "{FF0A00}-[Aaieieno?aoi?: %s]- {FFFFFF} i?aaoi?aaee ea?iea: %s [I?aaoi?a?aaiee %d/3]", pName, reason, GetPVarInt(target, "Warnings"));
SendClientMessage(target, COLOR_YELLOW, string);
format(string, sizeof string, "{FF0A00}-[Aaieieno?aoi?: %s]- {FFFFFF} i?aaoi?a?aaiey %s: %s [%i/3]", pName, gName, reason, GetPVarInt(target, "Warnings"));
}
return 1;
}