How to add a Anticheat Exception
#1

I wanna add exception for Casinos. The AC system dont recognizes the money you earn in it, as if it were 'out of play', cuz is a RPG server that transactions must be between players.


Код:
if(AntiMoneyHack == 1)
			{
				if(PlayerGotSpottedRecently[i] == 0)
				{
			        if(!IsAtCandySprunk(i))
			        {
						if(GetPlayerMoney(i) != ScriptMoney[i])
						{
						    if(ScriptMoneyUpdated[i] == 0)
						    {
							    if(IsAtPaySpray(i) || IsAtTransfender(i))
							    {
							        SetRealMoney(i, GetPlayerMoney(i));
								}
								if((GetPlayerMoney(i) - ScriptMoney[i]) >= 500 && (GetPlayerMoney(i) - ScriptMoney[i]) != 0)
								{
								    if(admins == 0 || afkadmins == admins)
				        			{
			  							format(string, sizeof(string), "%s (%d), Has been kicked by Anticheat for Possible Money Hacking.", plname, i);
										SendClientMessageToAll(COLOR_NICERED, string);
										format(string, sizeof(string), "You have Been Kicked by The Anticheat For Possible Weapon Money Hacking ($%d)",(GetPlayerMoney(i) - ScriptMoney[i]));
										SendClientMessage(i,COLOR_LIGHTBLUE, string);
										format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Has Kicked %s for: Money Hacking ($%d)",d,m,y,h,mi,s,plname,(GetPlayerMoney(i) - ScriptMoney[i]));
										KickLog(string);
										format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kicked by the Anticheat - Money Hacking.",d,m,y,h,mi,s,plname);
										AddPunishment(i, string);
										Kick(i);
									}
								    format(string, sizeof(string), "[AC]: %s (%d) Is possibly Using Money Hacks; Use /spec and check him!", plname, i);
									SendAdminMessage(COLOR_YELLOW, string);
									PlayerSuspicious[i] = 1;
									PlayerMoneyHacking[i] = 1;
									PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]);
									PlayerGotSpottedRecently[i] = 1;
									SetTimerEx("ResetAcWarn", 300000, 0, "i", i);
								}
								else
								{
								    if((GetPlayerMoney(i) - ScriptMoney[i]) >= 1)
								    {
									    format(string, sizeof(string), "[AC]: %s (%d) Is Bugged on a Cash Inbalance, Check him inmediately!!", plname, i);
										SendAdminMessage(COLOR_YELLOW, string);
										PlayerSuspicious[i] = 1;
										PlayerOnCashInbalance[i] = 1;
										PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]);
										PlayerGotSpottedRecently[i] = 1;
										SetTimerEx("ResetAcWarn", 90000, 0, "i", i);
									}
								}
							}
						}
					}
				}
			}
Reply
#2

Anyone? Sorry for bump.
Reply
#3

Check if the player's in the casino then check if he is controllable. Maybe this will work, but there are still ways for exploiting this.
Reply
#4

I dont understand man
How can i put 'Money of Casino' legal?
Reply
#5

Check for a certain interior that the person is in, if they are in that interior, allow their money to increase.
Reply
#6

Quote:
Originally Posted by Memoryz
Посмотреть сообщение
Check for a certain interior that the person is in, if they are in that interior, allow their money to increase.
Its what i want to do, but how can i?
Reply
#7

Check in OnPlayerUpdate, if player's interior is equal to the casino's interior skip it.
An example would be
pawn Код:
// --
if(GetPlayerMoney(i) != ScriptMoney[i])
{
    if(GetPlayerInterior(i) == 1 || GetPlayerInterior(i) == 10 || GetPlayerInterior(i) == 12) continue; // if the interiors are from Casino, skip that.
    if(ScriptMoneyUpdated[i] == 0)
    {
         // rest
Reply
#8

Look, I tried this:

Код:
if(AntiMoneyHack == 1)
			{
               if(IsPlayerInRangeOfPoint(i, 200, 2235.9165, 1603.2797, 1006.1818)){
               SetRealMoney(i, GetPlayerMoney(i));
                                    }else{
				if(PlayerGotSpottedRecently[i] == 0)
				{
				    if(Checked[i] == 0)
				    {
				        if(!IsAtCandySprunk(i))
				        {
							if(GetPlayerMoney(i) != ScriptMoney[i])
							{
							    if(ScriptMoneyUpdated[i] == 0)
							    {
								    if(IsAtPaySpray(i))
								    {
								        SetRealMoney(i, GetPlayerMoney(i));
									}

									if(IsAtTransfender(i))
									{
								        SetRealMoney(i, GetPlayerMoney(i));
									}
									if((GetPlayerMoney(i) - ScriptMoney[i]) >= 500)
									{
									    if(admins == 0 || afkadmins == admins)
					        			{
				  							format(string, sizeof(string), "%s (%d), Foi Kickado pelo Anticheat Need_Ziinho Por Possivel Money Hack.", plname, i);
											SendClientMessageToAll(COLOR_NICERED, string);
											format(string, sizeof(string), "Vocк Foi Kickado pelo Anticheat Need_Ziinho Por Possivel Money Hack (R$%d)",(GetPlayerMoney(i) - ScriptMoney[i]));
											SendClientMessage(i,COLOR_LIGHTBLUE, string);
											format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Anticheat Kickou %s por: Money Hack (R$%d)",d,m,y,h,mi,s,plname,(GetPlayerMoney(i) - ScriptMoney[i]));
											KickLog(string);
											format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Kickado Pelo Anticheat - Money Hack.",d,m,y,h,mi,s,plname);
											AddPunishment(i, string);
											Kick(i);
										}
									    format(string, sizeof(string), "[AntiCheat]: %s (%d) Estб Possivelmente Usando Money Hack; Cheque-o Imediatamente!!", plname, i);
										SendAdminMessage(COLOR_YELLOW, string);
										PlayerSuspicious[i] = 1;
										PlayerMoneyHacking[i] = 1;
										PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]);
										PlayerGotSpottedRecently[i] = 1;
										SetTimerEx("ResetAcWarn", 300000, 0, "i", i);
									}
									else
									{
									    format(string, sizeof(string), "[Anticheat]: %s (%d) Estб bugado na Estimativa De Dinheiro, Cheque-o imediatamente!!", plname, i);
										SendAdminMessage(COLOR_YELLOW, string);
										PlayerSuspicious[i] = 1;
										PlayerOnCashInbalance[i] = 1;
										PlayerSuspiciousMoney[i] = (GetPlayerMoney(i) - ScriptMoney[i]);
										PlayerGotSpottedRecently[i] = 1;
										SetTimerEx("ResetAcWarn", 90000, 0, "i", i);
									}

								}
							}
						}
					}
				}
              }
			}
But i have some bugs yet.
Now, you are not kicked, but you cant win or lose money too. This script that I worked, is now returning the money to 'Normal Money', always when have some change.
Reply
#9

Anyone? Sorry for bump.
Reply
#10

Sorry for Bump Topic Again, can anyone help here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)