// Anti Speed-hack by 007Skyfall to Forum samp forum.sa-mp.com do not remove credits. #include <a_samp> #if defined FILTERSCRIPT public OnGameModeInit() { return 1; } forward AntiSpeedHack(); public AntiSpeedHack() { for(new i=0; i<MAX_PLAYERS; i++) if(IsPlayerConnected(i)) { if(ObtenerVelocidad(i)> 230) { switch(GetVehicleModel(GetPlayerVehicleID(i))) { case 0,511,460,592,577,512,513,520,553,593,476,519: printf("[ID: %d] has used a speed-hack, and will be banned %skm/h",i,GetVehicleModel(GetPlayerVehicleID(i)),ObtenerVelocidad(i)); default: { new Float:X, Float:Y, Float:Z; GetPlayerPos(i, X, Y, Z); SendClientMessage(i, 0xFF0000FF,"[Anti-Hack]No speedhack Or you will banned!"); RemovePlayerFromVehicle(i); SetPlayerPos(i, X, Y, Z+5); } } } } } stock ObtenerVelocidad(playerid) { new Float:PosX, Float:PosY, Float:PosZ, Float:PlayerSpeedDistance; GetVehicleVelocity(GetPlayerVehicleID(playerid), PosX, PosY, PosZ); PlayerSpeedDistance = floatmul(floatsqroot(floatadd(floatadd(floatpower( PosX, 2), floatpower(PosY, 2)), floatpower(PosZ, 2))), 170.0); new spe = floatround(PlayerSpeedDistance * 1); return spe; } #endif
There is nothing appealing about filterscript have you created. Pardon me for saying so.
Note - Do not be offended. Because it is only an opinion. |
I think he's done a good job to be honest, it can be greatly improved yes.. but c'mon it's alright for his first release, I believe some people will find it useful..
weldone 007Skyfall I'll be looking forward to some of your more superior releases in future Alvon |