stock Float:GetPlayerSpeed(playerid, bool:Z = true) { new Float:SpeedX, Float:SpeedY, Float:SpeedZ; new Float:Speed; if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), SpeedX, SpeedY, SpeedZ); else GetPlayerVelocity(playerid, SpeedX, SpeedY, SpeedZ); if(Z) Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatadd(floatpower(SpeedY, 2.0), floatpower(SpeedZ, 2.0)))); else Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatpower(SpeedY, 2.0))); return floatmul(Speed, 200.0); } public AntiSpeedHack(playerid) { for(new i; i < MAX_PLAYERS; i++) { if(GetPlayerSpeed(i, false) > 325.0) { new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(string,sizeof string,"%s je banan sa servera Razlog: SpeedHack",name); SendClientMessageToAll(0xFF0005FF,string); SendClientMessage(playerid,0xFF0005FF,"EFS Anti-Cheat je registrirao SpeedHack, sta nije dozvoljeno na nasem serveru!"); SendClientMessage(playerid,0xFF0005FF,"Zato si banan sa naseg servera ako mislis da se radi o greski, mozes postaviti zahtijev za unban"); SendClientMessage(playerid,0xFF0005FF,"na nasem forumu: www.Extreme-FunServer.tk do tada dovidenja!"); BanEx(playerid,"Speedhack"); return 1; } } return 1; }
Originally Posted by DarkPower
This is my anti-speedhack
Код:
stock Float:GetPlayerSpeed(playerid, bool:Z = true) { new Float:SpeedX, Float:SpeedY, Float:SpeedZ; new Float:Speed; if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), SpeedX, SpeedY, SpeedZ); else GetPlayerVelocity(playerid, SpeedX, SpeedY, SpeedZ); if(Z) Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatadd(floatpower(SpeedY, 2.0), floatpower(SpeedZ, 2.0)))); else Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatpower(SpeedY, 2.0))); return floatmul(Speed, 200.0); } public AntiSpeedHack(playerid) { for(new i; i < MAX_PLAYERS; i++) { if(GetPlayerSpeed(i, false) > 325.0) { new string[128], name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,MAX_PLAYER_NAME); format(string,sizeof string,"%s je banan sa servera Razlog: SpeedHack",name); SendClientMessageToAll(0xFF0005FF,string); SendClientMessage(playerid,0xFF0005FF,"EFS Anti-Cheat je registrirao SpeedHack, sta nije dozvoljeno na nasem serveru!"); SendClientMessage(playerid,0xFF0005FF,"Zato si banan sa naseg servera ako mislis da se radi o greski, mozes postaviti zahtijev za unban"); SendClientMessage(playerid,0xFF0005FF,"na nasem forumu: www.Extreme-FunServer.tk do tada dovidenja!"); BanEx(playerid,"Speedhack"); return 1; } } return 1; } |
Originally Posted by ¤Adas¤
Quote:
|
Originally Posted by [DJ
[SF]Зурэ Яииr ∞™ ]
yes i believe thats why cause i think "I" is other players and "playerid" is the one speed hacking Hope This Helped, [DJ][SF]Зурэ Яииr ∞™ |