Advertisement
Guest User

Police Alert

a guest
Oct 10th, 2022
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.98 KB | Gaming | 0 0
  1. #include    <foreach>
  2. #include    <gz_shapesals>
  3.  
  4. new Iterator:Policia<MAX_PLAYERS>;
  5. new AnnounceShot[MAX_PLAYERS];
  6.  
  7. /* Quando o jogador entrar em serviço
  8. Iter_Add(Policia, playerid); */
  9.  
  10. /* Quando o jogador sair do serviço
  11. Iter_Remove(Policia, playerid); */
  12.  
  13. public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
  14. {
  15.     if(!Iter_Contains(Policia, playerid))
  16.     {
  17.         if(Announce[playerid] < gettime())
  18.         {
  19.             static shapeid;
  20.             shapeid = GZ_ShapeCreate(EMPTY_CIRCLE, fX, fY, 60.0);
  21.             SetTimerEx("HideGangZone", 10000, 0, "d", shapeid);
  22.    
  23.             static id; id = 0;
  24.             foreach(id : Policia)
  25.             {
  26.                 GZ_ShapeShowForPlayer(id, shapeid, 0x0000FFFF); // por padrao ja mostra por 8 segundos
  27.                 GameTextForPlayer(id. "~r~COPOM: ~w~ocorrencia de disparos em andamento!", 1, 1);
  28.             }
  29.  
  30.             Announce[playerid] = gettime() + 10;
  31.         }
  32.     }
  33.     return 1;
  34. }
  35.  
  36. forward void:HideGangZone(shapeid);
  37. public void:HideGangZone(shapeid)
  38. {
  39.     GZ_ShapeDestroy(shapeid);
  40. }
  41.  
Tags: DeviceBlack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement