Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------External Gang Zones FilterScript by [_FFG_]BuLLeT------------------------------------------------
- #include <a_samp>
- #define FLANK_THICKNESS 50
- #define COLOR_ZONE 0xFF0000FF
- new Float:ZoneCoords[1][4] = { //coordinates of normal gang zone
- {1256.7238,1142.2188,1727.8041,1864.1296}
- };
- new Zone[4];
- new ZoneCreated;
- public OnFilterScriptInit()
- {
- print("\n|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|");
- print(" External Gang Zones [FS] by [_FFG_]BuLLeT");
- print("|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|\n");
- ZoneCreated = 0;
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(ZoneCreated == 1)
- {
- GangZoneShowForPlayer(playerid,Zone[0],COLOR_ZONE);
- GangZoneShowForPlayer(playerid,Zone[1],COLOR_ZONE);
- GangZoneShowForPlayer(playerid,Zone[2],COLOR_ZONE);
- GangZoneShowForPlayer(playerid,Zone[3],COLOR_ZONE);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(ZoneCreated == 1)
- {
- GangZoneHideForPlayer(playerid,Zone[0]);
- GangZoneHideForPlayer(playerid,Zone[1]);
- GangZoneHideForPlayer(playerid,Zone[2]);
- GangZoneHideForPlayer(playerid,Zone[3]);
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/zone", cmdtext, true, 5) == 0) //creates external gang zone from normal coordinates. It's made of 4 gang zones
- {
- Zone[0] = GangZoneCreate(ZoneCoords[0][2],ZoneCoords[0][1]-FLANK_THICKNESS,ZoneCoords[0][2]+FLANK_THICKNESS,ZoneCoords[0][3]+FLANK_THICKNESS);
- Zone[1] = GangZoneCreate(ZoneCoords[0][0]-FLANK_THICKNESS,ZoneCoords[0][1]-FLANK_THICKNESS,ZoneCoords[0][0],ZoneCoords[0][3]+FLANK_THICKNESS);
- Zone[2] = GangZoneCreate(ZoneCoords[0][0],ZoneCoords[0][1]-FLANK_THICKNESS,ZoneCoords[0][2],ZoneCoords[0][1]);
- Zone[3] = GangZoneCreate(ZoneCoords[0][0],ZoneCoords[0][3],ZoneCoords[0][2],ZoneCoords[0][3]+FLANK_THICKNESS);
- ZoneCreated = 1;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GangZoneShowForPlayer(i,Zone[0],COLOR_ZONE);
- GangZoneShowForPlayer(i,Zone[1],COLOR_ZONE);
- GangZoneShowForPlayer(i,Zone[2],COLOR_ZONE);
- GangZoneShowForPlayer(i,Zone[3],COLOR_ZONE);
- }
- }
- return 1;
- }
- if (strcmp("/dzone", cmdtext, true, 6) == 0)
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- GangZoneHideForPlayer(i,Zone[0]);
- GangZoneHideForPlayer(i,Zone[1]);
- GangZoneHideForPlayer(i,Zone[2]);
- GangZoneHideForPlayer(i,Zone[3]);
- }
- }
- GangZoneDestroy(Zone[0]);
- GangZoneDestroy(Zone[1]);
- GangZoneDestroy(Zone[2]);
- GangZoneDestroy(Zone[3]);
- ZoneCreated = 0;
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement