Jump to content

script Anti Money Cheat trošku inak[0.3]


Mattsy

Recommended Posts

Ako niektorý vedia mal som problém s Anti Money Cheatom tak som skúšal to spraviť tak aby to fungovalo. A podarilo sa. Má len pár riadkov a funguje

 

Hore medzi define:

 

#define DajHracoviPeniaze(%0,%1)	SetPVarInt(%0,"Money",ZistiHracovepeniaze(%0)+%1),GivePlayerMoney(%0,%1)
#define ResetujHracoviPeniaze(%0)		SetPVarInt(%0,"Money",0),ResetPlayerMoney(%0)
#define ZistiHracovePeniaze(%0)		GetPVarInt(%0,"Money")

 

Medzi forwardy:

 

forward AntiMoneyCheat(); 

 

Public:

 

public AntiMoneyCheat()
{
for(new i = 0; i < MPE; i++)
{
	if(IsPlayerConnected(i))
	{
		if(ZistiHracovePeniaze(i) != GetPlayerMoney(i))
		{
		    new const cash = ZistiHracovePeniaze(i);
		    ResetujHracoviPeniaze(i), DajHracoviPeniaze(i, cash);
		}
	}
}
}

 

A teraz keď to budeme chcieť použiť len použijeme AntiMoneyCheat(); napríklad do sekundového timeru ako to mám ja :)

 

Všetko funguje a peniaze odčítava, odskúšané :)

Link to comment
Share on other sites

nikde nevidim jednu dulezitou vec ato ze kdyz pridava tak to chrani dobre ale co kdyz koupi tycinku v automatu tak mu to veskutecnosti neodecte ale prida -1$ a to ten ac nevi

Link to comment
Share on other sites

nj tak bugy to má, ale vačšina hráčov aj tak automaty nepoužíva a to ma ani nenapadlo a ani nwm že sa tak dá spraviť :d

 

 

staci kdyz pouzijes >0

Link to comment
Share on other sites

nj tak bugy to má, ale vačšina hráčov aj tak automaty nepoužíva a to ma ani nenapadlo a ani nwm že sa tak dá spraviť :d

 

 

staci kdyz pouzijes >0

 

okey potom sa nato pozriem a hodím to tu thx ;) teraz nemám čas :d

Link to comment
Share on other sites

hmm no mám 1 error...

C:\Users\MaxKing\Desktop\Server\gamemodes\ORS.pwn(398) : error 017: undefined symbol "ZistiHracovepeniaze"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Ale pritom mám:

#define ZistiHracovePeniaze(%0)      GetPVarInt(%0,"Money")

 

Čo s tým?

 

A divnejšie je že riadok 398 je:

ResetujHracoviPeniaze(i), DajHracoviPeniaze(i, cash);

Link to comment
Share on other sites

hmm no mám 1 error...

C:\Users\MaxKing\Desktop\Server\gamemodes\ORS.pwn(398) : error 017: undefined symbol "ZistiHracovepeniaze"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Ale pritom mám:

#define ZistiHracovePeniaze(%0)      GetPVarInt(%0,"Money")

 

Čo s tým?

 

A divnejšie je že riadok 398 je:

ResetujHracoviPeniaze(i), DajHracoviPeniaze(i, cash);

 

je tam chyba, si to oprav :) namiesto "ZistiHracovepeniaze" daj peniaze s velkym P a pojde ti super (testovane cheatrom ;) )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...