Advertisement
MichaelFR

SAMP AntiCrasher Filterscript

Aug 25th, 2015
1,133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.52 KB | None | 0 0
  1. // Samp Anti Crasher FilterScript
  2. //Credits: Michael,Dimi
  3. //Lijepo bi bilo da ostavite credits u vasem modu
  4. //Morate imati updateani YSI, ukoliko vam izbaci errore nakon compile skinite ovo- http://forum.sa-mp.com/showthread.php?t=570883
  5. #define COLOR_BRIGHTRED 0xDC143CAA // Ubacite ukoliko nemate vec definirano
  6. #define IsValidWeapon(%0) (%0>=1 && %0<=18 || %0>=21 && %0<=46)//provjera jel oruzje pravo, ne dirajte to
  7.  
  8.  
  9. public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ )
  10. {
  11.     if( hittype != BULLET_HIT_TYPE_NONE )
  12.     {
  13.         if( !( -1000.0 <= fX <= 1000.0 ) || !( -1000.0 <= fY <= 1000.0 ) || !( -1000.0 <= fZ <= 1000.0 ) )
  14.         {
  15.             Kick(playerid);//Kicka ga sa servera ako ima crasher. Dodajte adminima text da pise ako zelite
  16.             return 0;
  17.         }
  18.     }
  19.     if( hittype == BULLET_HIT_TYPE_PLAYER )
  20.     {
  21.     if(hitid == playerid)
  22.     {
  23.         Kick(playerid);//Kicka ga sa servera ako ima crasher. Dodajte adminima text da pise ako zelite
  24.         return 0;
  25.     }
  26.     }
  27.     if( hittype == BULLET_HIT_TYPE_PLAYER )
  28.     {
  29.     if( fX == 0.000000 && fY == 0.000000 && fZ == 0.500000 && weaponid == 0)
  30.     {
  31.         Kick(playerid);//Kicka ga sa servera ako ima crasher. Dodajte adminima text da pise ako zelite
  32.         return 0;
  33.     }
  34.     }
  35.     if( hittype == 0 && !IsValidWeapon(weaponid) )
  36.     {
  37.     if( fX == 0.000000 && fY == 0.000000 && fZ == 0.000000 )
  38.     {
  39.         Kick(playerid);//Kicka ga sa servera ako ima crasher. Dodajte adminima text da pise ako zelite
  40.         return 0;
  41.     }
  42.     }
  43.     return 1;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement