Remove !!! -
M0HAMMAD - 05.09.2014
Remove !!!
Re: [Pho-AC] (Best) Anti Weapon Hack -
hitman14 - 05.09.2014
Awsome Script .
TY man
Re: [Pho-AC] (Best) Anti Weapon Hack -
Stinged - 05.09.2014
You should use weapon slots, not variables for each weapon.
Re: [Pho-AC] (Best) Anti Weapon Hack -
M0HAMMAD - 05.09.2014
Stinged, yes I Can Do That, in The Next Update !
And Other !
Please Read Note !
Some one Tell Me The Your FS Not Work And I Send To hem NOTE ! Please Read Note :
Note
Don't Forget To Add
CheckWeapons(); In OnPlayerUpdate And
ResetPlayerWeaponStats(playerid); In
OnPlayerSpawn,
OnPlayerDisconnect
And Use
GivePlayerWeaponEx(playerid,Weapon,Ammo); For
GivePlayerWeapon(playerid,Weapon,Ammo);.
If You Defined The Server Not Give You Weapon.
-------------------------
Before I Create This Thread, I Like To Changed To Include But I Don't That. So You Must Added In To Your GameMode
-------------------------
If Someone Find Any Bug Say Here. Thanks :X
Re: [Pho-AC] (Best) Anti Weapon Hack -
Stinged - 05.09.2014
Quote:
Originally Posted by M0HAMMAD
Note
Don't Forget To Add CheckWeapons(); In OnPlayerUpdate And ResetPlayerWeaponStats(playerid); In OnPlayerSpawn, OnPlayerDisconnect
And Use GivePlayerWeaponEx(playerid,Weapon,Ammo); For GivePlayerWeapon(playerid,Weapon,Ammo);.
If You Defined The Server Not Give You Weapon.
-------------------------
Before I Create This Thread, I Like To Changed To Include But I Don't That. So You Must Added In To Your GameMode
-------------------------
If Someone Find Any Bug Say Here. Thanks :X
|
Don't use CheckWeapons under OnPlayerUpdate, it will be very bad and laggy. Imagine checking more than 20 arrays like 5 times a second. You should use a timer that works every 1 - 3 seconds.
Re: [Pho-AC] (Best) Anti Weapon Hack -
BarFix - 05.09.2014
good job man, i like it
Re: [Pho-AC] (Best) Anti Weapon Hack -
[WSF]ThA_Devil - 05.09.2014
Gonna fail terribly after death...
As well, I'd suggest you using hooks, so it is like plug and play. No need to edit your script.
And, it will fail using
gun shops!
Quote:
Originally Posted by Stinged
Don't use CheckWeapons under OnPlayerUpdate, it will be very bad and laggy. Imagine checking more than 20 arrays like 5 times a second. You should use a timer that works every 1 - 3 seconds.
|
That's nothing.... 20 arrays check 5 times a second is close to nothing in performance, unless you're running 32Mb ram module (alone)
The thing you shouldn't do under OnPlayerUpdate is doing player sided stuff, like SetPlayerPos'ing, or anything that sends packets to client, that is what makes it lag.
Or more difficult calculations, but there is nothing like that in it.
You can have 5 line script that lags server with single comparison, or 50 line OnPlayerUpdate script that doesn't lag at all. How you use it is what matters.
Example:
Textdraws and Set* functions are bound to create problems.
but
Get are not.
Since player updates it to server by it self, and server fetches it from server memory.
There are so many stuff hidden in memory, just like AttachPlayerObjectToPlayer ( YSF) and Police car siren states.
My own *OnPlayerUpdate* is 109 lines long, by following these terms:
In line counter included public function, each bracket in new line, and few comments.
Clean length would be about 50 - 70 lines.
And it does not cause any lag what so ever.
Re: [Pho-AC] (Best) Anti Weapon Hack -
JM_Millers - 05.09.2014
This's the worst anti weapon cheat I've ever seen!
Re: [Pho-AC] (Best) Anti Weapon Hack -
M0HAMMAD - 05.09.2014
JM_Millers What Is The Problem ? This Model Is Better Form GetPlayerWeapon !
I Use This For My own server.
Re: [Pho-AC] (Best) Anti Weapon Hack -
JM_Millers - 05.09.2014
Quote:
Originally Posted by M0HAMMAD
JM_Millers What Is The Problem ? This Model Is Better Form GetPlayerWeapon !
I Use This For My own server.
|
I mean code, it's ugly.
You could use one char-array instead of 40 MAX_PLAYERS variables.
Also, 500 milliseconds is too small, I think it'll be better with 100 milliseconds.
So, you've got 40 if-statements, while you can got 1 (if you used an array).
And at the eng, the loop is doing 500-1000 iterations per 0.5 seconds, it's too bad.