nice code, thanks :D
Printable View
nice code, thanks :D
im useing dnc's 1st src but everytime it kills something for hacking im getting this in the sslog
and no ban you can just reviveCode:BrostCast Notice Msg to all servers. 'FairFight Banned 'Obststand''
000602.566| Obststand killed by Obststand, forced: 1
000602.567| LogInfo: peer00, r:Death , CID:1020509 [Obststand], ip:178.12.42.59
000602.567| peer00, SetLatePacketsBarrier: death
000602.586| Received notice packet from master. msg 'FairFight Banned '******'' , brostcast to all players.
000602.588| WO_API: failed with error code 5 SQL Select Failed: Procedure or function 'ADMIN_BanUser' expects parameter '@in_BanReason', which was not supplied.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title></head>
<body>
<form name="form1" method="post" action="api_BanID.aspx" id="form1">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZK/7NIDTPSig13lZUcz0aYIooW3T" />
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="97327496" />
<div>
</div>
</form>
</body>
</html>
000602.588| apiBanID Failed. Code 5
000602.662| peer00 PKT_C2C_PacketBarrier_s death 1 vs 1
000608.716| time: 609, plrs:1/80, net_lastFreeId: 4827, objects: 4821, async:0 0 0 0
000609.876| PKT_C2S_DisconnectReq for *****
000609.876| LogInfo: peer00, r:DisconnectPeer disconnect request while dead, we already updated profile, CID:1020509 [Obststand], ip:178.12.42.59
000609.876| DeletePlayer: *******, playerIdx: 0
Change the function for that simpler here and test again
Code:-- ----------------------------
-- Procedure structure for [ADMIN_BanUser]
-- ----------------------------
ALTER PROCEDURE [dbo].[ADMIN_BanUser]
@in_CustomerID int,
@in_Reason VARCHAR(512)
AS
BEGIN
update UsersData set AccountStatus=200 WHERE CustomerID=@in_CustomerID
update UsersData set BanReason=@in_Reason WHERE CustomerID=@in_CustomerID
update Accounts set AccountStatus=200 WHERE CustomerID=@in_CustomerID
update LoginSessions set SessionID=0 where CustomerID=@in_CustomerID
-- Insert to BanLog
insert into dbo.DBG_BanLog values (@in_CustomerID, GETDATE(), 300, @in_Reason)
select 0 as ResultCode
END
right now all fixed thank you @italofialho but it was down to the code that was posted up on here for banreason when its ment to be reason lol after changing it about i got it working great :)
when i get to my pc next i will post up the code fully redone to work with the iss src as i have it fully working in there fine
Attachment 154054
how to fix error?
try put this
----------- Problem ----------Code:if(loadout_->Skills[CUserSkills::SKILL_Survival9]) // Fix!
I do not know if it's working but I had to change this function, because whenever he entered the server took disconnect.
It takes within 10 to 15 seconds.
Code:void obj_ServerPlayer::OnNetPacket(const PKT_C2S_PlayerWeapDataRepAns_s& n)
{
if(weapDataReqExp < 0)
return;
weapDataReqExp = -1;
// if weapon data was updated more that once it mean that updated happened in middle of the game
// so skip validation
if(gServerLogic.weaponDataUpdates_ >= 2)
return;
for(int i=0; i<2; i++)
{
if(m_WeaponArray[i] == NULL)
continue;
DWORD hash = m_WeaponArray[i]->getConfig()->GetClientParametersHash();
if(hash == n.weaponsDataHash[i])
continue;
const WeaponConfig& wc1 = *m_WeaponArray[i]->getConfig();
WeaponConfig wc2(n.debug_wid[i]);
wc2.copyParametersFrom(n.debug_winfo[i]);
if(wc1.m_itemID != wc2.m_itemID)
{
gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_Protocol, true, "weapDataRep different",
"slot%d c:%06d s:%06d (p:%06d)", i, wc2.m_itemID, wc1.m_itemID, m_dbg_PreviousWeapon[i]);
}
else
{
// create diffs string for logging
char diffs[4096] = "";
if(fabs((float)wc1.m_spread - (float)wc2.m_spread) > 0.01f)
sprintf(diffs + strlen(diffs), "s:%.2f/%.2f ", (float)wc1.m_spread, (float)wc2.m_spread);
if(fabs((float)wc1.m_recoil - (float)wc2.m_recoil) > 0.01f)
sprintf(diffs + strlen(diffs), "r:%.2f/%.2f ", (float)wc1.m_recoil, (float)wc2.m_recoil);
if(fabs((float)wc1.m_reloadTime - (float)wc2.m_reloadTime) > 0.01f)
sprintf(diffs + strlen(diffs), "t:%.2f/%.2f ", (float)wc1.m_reloadTime, (float)wc2.m_reloadTime);
if(fabs((float)wc1.m_fireDelay - (float)wc2.m_fireDelay) > 0.01f)
sprintf(diffs + strlen(diffs), "d:%.2f/%.2f ", (float)wc1.m_fireDelay, (float)wc2.m_fireDelay);
if(fabs((float)wc1.m_AmmoSpeed - (float)wc2.m_AmmoSpeed) > 0.01f)
sprintf(diffs + strlen(diffs), "a:%.2f/%.2f ", (float)wc1.m_AmmoSpeed, (float)wc2.m_AmmoSpeed);
// report it only once per session (for now, because there is no disconnect yet)
if(diffs[0] && !weapCheatReported)
{
weapCheatReported = true;
gServerLogic.LogCheat(peerId_, PKT_S2C_CheatWarning_s::CHEAT_BadWeapData, false, "weapDataRep different",
"id:%d, diff:%s", wc1.m_itemID, diffs);
}
// FF-SYSTEM - automatic ban.
if(diffs[0])
{
char chatmessage[128] = {0};
g_AsyncApiMgr->AddJob(new CJobBanID(profile_.CustomerID,diffs));
gMasterServerLogic.SendNoticeMsg("AntiCheat Banned '%s'",userName);
gServerLogic.DoKillPlayer(this, this, storecat_INVALID, true);
}
}
}
}
Now the server is no disconnecting the players or giving any problems.
but also do not know if it's working the FF.
forgot this in v3 source
obj_ServerPlayer.h
add thisCode:bool weapCheatReported;
Code:float lastWeapDataRep; // time when last PKT_C2S_PlayerWeapDataRep_s was received
how to
in Version 3 Src ?Quote:
bool isTargetDummy_;
to make this system work on source (v3) it is not only how to follow the tutorial.
variables is missing and you need to insert extra code.
I have it running on the source codex v3, but I no will be able to send you the moment, because the code is not running ban.
if you have a bit of wisdom, you are able to account, is extremely easy
survivals unknown source I use the source avto-ban is not working http://s019.radikal.ru/i634/1607/f4/9f19b2ec4342.jpg
Maybe I did something wrong can be FairFight need to connect or what?:glare:
Learn C++. Instead Copy&Paste. ;)