Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Filterscripta napravljena 15.10.2010. godine.
- FS napravio rascal
- Nemojte brisati CREDISE,iako znam da ce vas to vecina uraditi
- Eto nadam se da sam nekome pomogao
- Nisam optimizirao FS,jer sam ovo radio na brzinu...
- Vreme rada 2h.. :D
- */
- #include <a_samp>
- #define MaxBrzina 230
- #define Crvena 0xFF0000AA
- new BrzinaHacker[MAX_PLAYERS];
- forward Brzina();
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- SetTimer("Brzina",5000,1);
- print("\n--------------------------------------");
- print(" AntiBrzinaHack filterscripta ucitana");
- print("made by: rascal\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Ovaj server koristi FS AntiSpeedHack");
- print("made by: rascal\n");
- }
- #endif
- public Brzina()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(IgracevaBrzina(i) >= MaxBrzina)
- {
- if(!IsPlayerAdmin(i))
- {
- new playerState = GetPlayerState(i);
- if(playerState == PLAYER_STATE_DRIVER)
- {
- new Vozilo = GetVehicleModel(GetPlayerVehicleID(i));
- if(Vozilo == 592 || Vozilo== 577 ||Vozilo == 511 || Vozilo == 512
- || Vozilo == 593 || Vozilo== 520 || Vozilo== 553 || Vozilo == 476
- || Vozilo== 519 || Vozilo == 460 ||Vozilo == 513|| Vozilo == 425)
- {
- return 1;
- }
- else
- {
- BrzinaHacker[i] += 1;
- new ime[MAX_PLAYER_NAME], string[128];
- GetPlayerName(i, ime, sizeof(ime));
- format(string, sizeof(string), "AntiCheat: %s[%d] mozda koristi SpeedHack! Provjerite ga!", ime, i, i);
- SendClientMessageToAll(Crvena, string);
- }
- if(BrzinaHacker[i] >= 3)
- {
- new ime[MAX_PLAYER_NAME], string[128];
- GetPlayerName(i, ime, sizeof(ime));
- format(string, sizeof(string), "AntiCheat: %s je banovan sa servera. Razlog: SpeedHack!", ime);
- SendClientMessageToAll(Crvena, string);
- Ban(i);
- }
- }
- }
- }
- }
- }
- return 1;
- }
- stock IgracevaBrzina(playerid)
- {
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid))
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
- return floatround(ST[3]);
- }
Advertisement
Add Comment
Please, Sign In to add comment