22.03.2016, 04:17
I got this code in script
I don't understand, when I change name to register it always kick me out!!!! (sorry for bad Eng)
PHP код:
forward ******Check(playerid);
public ******Check(playerid)
{
if(GetPVarInt(playerid, "JailDelay") == 0)
{
if(PlayerInfo[playerid][pJailTime] > 0)
{
SetTimerEx("******Check", 1000, 0, "i", playerid);
SetPVarInt(playerid, "JailDelay", 1);
return 1;
}
}
DeletePVar(playerid, "JailDelay");
if(IsPlayerFrozen[playerid] == 1)
{
new Float:hX, Float:hY, Float:hZ, Float:pX, Float:pY, Float:pZ, Float:cX, Float:cY, Float:cZ, Float:cX1, Float:cY1, Float:cZ1;
GetPlayerCameraFrontVector(playerid, cX1, cY1, cZ1);
GetPlayerPos(playerid, cX, cY, cZ);
hX = GetPVarFloat(playerid, "FrontVectorX");
hY = GetPVarFloat(playerid, "FrontVectorY");
hZ = GetPVarFloat(playerid, "FrontVectorZ");
pX = GetPVarFloat(playerid, "PlayerPositionX");
pY = GetPVarFloat(playerid, "PlayerPositionY");
pZ = GetPVarFloat(playerid, "PlayerPositionZ");
if(pX != cX && pY != cY && pZ != cZ && hX != cX1 && hY != cY1 && hZ != cZ1)
{
SendClientMessageEx(playerid, COLOR_RED, "Ban kiem tra nguoi choi that bai, vui long relog va thu lai!");
IsPlayerFrozen[playerid] = 0;
DeletePVar(playerid,"FrontVectorX");
DeletePVar(playerid,"FrontVectorY");
DeletePVar(playerid,"FrontVectorZ");
DeletePVar(playerid,"PlayerPositionX");
DeletePVar(playerid,"PlayerPositionY");
DeletePVar(playerid,"PlayerPositionZ");
SetTimerEx("KickEx", 1000, 0, "i", playerid);
return 1;
}
}
new Float:aX, Float:aY, Float:aZ, szString[128];
GetPlayerCameraFrontVector(playerid, aX, aY, aZ);
#pragma unused aX
#pragma unused aY
if(aZ < -0.7)
{
new IP[32];
GetPlayerIp(playerid, IP, sizeof(IP));
TogglePlayerControllable(playerid, true);
if(PlayerInfo[playerid][pSMod] == 1 || PlayerInfo[playerid][pAdmin] == 1)
{
format(szString, sizeof(szString), "SELECT `Username` FROM `accounts` WHERE `AdminLevel` > 1 AND `Disabled` = 0 AND `IP` = '%s'", GetPlayerIpEx(playerid));
mysql_function_query(MainPipeline, szString, true, "CheckAccounts", "i", playerid);
}
else {
format(szString, sizeof(szString), "INSERT INTO `******kicks` (sqlID, Kicks) VALUES (%d, 1) ON DUPLICATE KEY UPDATE Kicks = Kicks + 1", GetPlayerSQLId(playerid));
mysql_function_query(MainPipeline, szString, false, "OnQueryFinish", "ii", SENDDATA_THREAD, playerid);
SendClientMessageEx(playerid, COLOR_RED, "Phan mem hack '******' khong duoc phep su dung tren server nay, vui long go bo cai dat de tiep tuc tham gia server.");
format(szString, sizeof(szString), "%s (IP: %s) da co gang dang nhap voi phan mem ****** duoc cai dat.", GetPlayerNameEx(playerid), IP);
Log("logs/******.log", szString);
IsPlayerFrozen[playerid] = 0;
SetTimerEx("KickEx", 1000, 0, "i", playerid);
}
}
if(playerTabbed[playerid] > 2) { SendClientMessageEx(playerid, COLOR_RED, "Ban da that bai trong viec kiem tra tai khoan, vui long relog va thu lai."), SetTimerEx("KickEx", 1000, 0, "i", playerid); }
if(PlayerInfo[playerid][pVW] > 0 || PlayerInfo[playerid][pInt] > 0) HideNoticeGUIFrame(playerid);
******Checkvar[playerid] = 1;
******CheckIsDone[playerid] = 1;
IsPlayerFrozen[playerid] = 0;
TogglePlayerControllable(playerid, true);
return 1;
}