Posts: 775
Threads: 78
Joined: Dec 2014
IntroductionI was challanged to 'create a better' include other than using a 50 millisecond timer
Functions
Code:
GivePlayerMoney(playerid, amount);
GetPlayerMoney(playerid);
ResetPlayerMoney(playerid);
forward OnPlayerHackMoney(playerid, hackedmoney, realmoney);
ExplanationThis is basically an anti money include that I was challanged for some reason to do.
Download
Posts: 630
Threads: 23
Joined: May 2012
Reputation:
0
Nice, although your introduction section is mixed up.
Posts: 775
Threads: 78
Joined: Dec 2014
Quote:
Originally Posted by FreAkeD
Nice, although your introduction section is mixed up.
|
Oh rip, copied the style from my other include, lemme fix that.
Thanks. lmao.
Posts: 775
Threads: 78
Joined: Dec 2014
Quote:
Originally Posted by WhiteGhost
Code:
ResetPlayerMony(playerid);
Should be:
Code:
ResetPlayerMoney(playerid);
|
Oh thanks, fixing it soon, will update the thread
Posts: 131
Threads: 4
Joined: Jul 2016
Reputation:
0
Ohh you meant hooks I tough you mean something else we'll never mind good job
and yes I admit your way is batter!
Posts: 775
Threads: 78
Joined: Dec 2014
Quote:
Originally Posted by Deadpoop
Ohh you meant hooks I tough you mean something else we'll never mind good job
and yes I admit your way is batter!
|
It'snot only the hooking,
imagine a timer that runs each 50 milliseconds,
1 second=1000 milliseconds
1000/50 = 20
Your include runs 20 times a second.
Almost like OnPlayerUpdate.
It will cause lag.
It will cause really big lag when there's alot of player in game.
Posts: 775
Threads: 78
Joined: Dec 2014
Quote:
Originally Posted by Deadpoop
Yes you right I just never learned hooks
I guess it time to learn
|
I just said it's not about the hooking..
Re-read.
Posts: 807
Threads: 62
Joined: Dec 2014
Reputation:
0
02.08.2016, 17:03
(
Last edited by SecretBoss; 02/08/2016 at 05:56 PM.
)
Actually it is a server sided system you can remove the money directly or just don't give them return 0 on the GivePlayerMoney hook
That will prevent hackers from even using it, well they will use it but there will be no effect so they will give up that's the logic also you keep the player online instead of banning/kicking him
Edit:
I checked your code and it won't actually work because a hackers adds some money GivePlayerMoney is called you are putting the check for your callback on GetPlayerMoney for god sake what a logic
Your code is pointless