Antihack detect problem
#1

I am trying to create a anti hack system, this is against money, but its saying he is hacking even when hes not
pawn Код:
foreach(Player, i)
{
    if(GetPlayerMoney(i) >= PlayerInfo[i][pMoney])
    {
        format(string, sizeof(string), "(HACK) %s is using money hacks.", name);
        SendAdminMessage(1, COLOR_RED, string);
    }
}
Should check if their money is higher than pMoney
Reply
#2

>=
Will check if it's higher than OR equal to something, you should only use > to check if it's higher than something.
= should be used to detect if it's equal to ( == ) or not equal to ( != ) in an if.
Reply
#3

Thanks i thought you should use it like != by doing >=
Reply
#4

This will report players who used Vending machines or ammuntaions.
Reply
#5

Why would it do that?
It checks if his client money is higher than his server pMoney value, and you don't gain money from vending machines or ammunation.
Reply
#6

What if a player stunt?
Reply
#7

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
What if a player stunt?
Should be disabled on reallife server
Reply
#8

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Should be disabled on reallife server
So, can we prevent moneyhackers with this?
Reply
#9

I disabled stunt bonus in my script dont worry
Reply
#10

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
So, can we prevent moneyhackers with this?
Actually you should disable it on your stunt server too, because its buggy.

e.g. you can drive ("fly") the mount chillard down...and get sooo much mony..and you can do that 3 times and you are rich (without cheating).

So you should just script the stuntbonus feature
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)