27.11.2016, 20:15
PHP Code:
public OnPlayerConnect(playerid)
{
new string[10];
if(GetPlayerVersion(playerid, string, sizeof(string)))
{
if(strfind(string, CLIENT_VERSION, true) == -1)
{
// Если игрок подключается с не валидным Клиентом не соответсвующий с CLIENT_VERSION.
new str[70];
format(str, sizeof(str), "Клиент: {b9c7be}%s | {aac5e3}Требуется: {b9c7be}"CLIENT_VERSION"", string);
SendClientMessage(playerid, COLOR_LIGHTRED, str);
SendClientMessage(playerid, COLOR_LIGHTRED, "[!] Ваш клиент устарел, новую версию можно скачать на сайте {b9c7be}rp-skrilax.su");
KickD(playerid, "");
return true;
}
else
{
PI[playerid][AntiAttack]++;
if(PI[playerid][AntiAttack] > 1)
{
PI[playerid][AntiAttack] = 0;
CheatKick(playerid, 21);
return false;
}
//
SetPVarInt(playerid, "AntiBreik", gettime() + 500);
SetPVarInt(playerid, "GunCheck", gettime() + 500);
GetPlayerName(playerid, PI[playerid][Name], MAX_PLAYER_NAME);
SetPlayerColor(playerid, 0xFFFFFF00);
SetPVarInt(playerid, "player_kick_time", GetTickCount() + 15000);
Reset(playerid);
p_ac{playerid} = 0;
if(STimer[playerid] != -1) KillTimer(STimer[playerid]), STimer[playerid] = -1;
if(tChainSaw[playerid] != -1) KillTimer(tChainSaw[playerid]), tChainSaw[playerid] = -1;
//
RemoveBuildingForPlayer(playerid, 1411, 347.1953, 1799.2656, 18.7578, 0.25);
RemoveBuildingForPlayer(playerid, 1411, 342.9375, 1796.2891, 18.7578, 0.25);
RemoveBuildingForPlayer(playerid, 968, -2436.8125, 495.4688, 29.6797, 0.25);
format(WantNickChange[playerid], MAX_PLAYER_NAME, "");
ResetPlayerWeapons(playerid);
CreateEatTextDraw(playerid);
for(new i = 0; i < 46; i++) Weapons[playerid][i] = 0;
for(new i; i < 11; i++) GiveGuns[i][playerid] = 0;
for(new i = 1; i <= TOTALGZ; i++)
{
GangZoneShowForPlayer(playerid, GZInfo[i][gID], GetGangZoneColor(i));
}
GangZoneShowForPlayer(playerid, GangZoneBizzWar[0], 0x0bda51FF);
GangZoneShowForPlayer(playerid, GangZoneBizzWar[1], 0x0bda51FF);
GangZoneShowForPlayer(playerid, GangZoneBizzWar[2], 0x0bda51FF);
//return true;
}
}
else
{
Kick(playerid);
return false;
}
return true;
}