Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <foreach>
- #include <gz_shapesals>
- new Iterator:Policia<MAX_PLAYERS>;
- new AnnounceShot[MAX_PLAYERS];
- /* Quando o jogador entrar em serviço
- Iter_Add(Policia, playerid); */
- /* Quando o jogador sair do serviço
- Iter_Remove(Policia, playerid); */
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(!Iter_Contains(Policia, playerid))
- {
- if(Announce[playerid] < gettime())
- {
- static shapeid;
- shapeid = GZ_ShapeCreate(EMPTY_CIRCLE, fX, fY, 60.0);
- SetTimerEx("HideGangZone", 10000, 0, "d", shapeid);
- static id; id = 0;
- foreach(id : Policia)
- {
- GZ_ShapeShowForPlayer(id, shapeid, 0x0000FFFF); // por padrao ja mostra por 8 segundos
- GameTextForPlayer(id. "~r~COPOM: ~w~ocorrencia de disparos em andamento!", 1, 1);
- }
- Announce[playerid] = gettime() + 10;
- }
- }
- return 1;
- }
- forward void:HideGangZone(shapeid);
- public void:HideGangZone(shapeid)
- {
- GZ_ShapeDestroy(shapeid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement