06.10.2016, 12:49
(
Последний раз редактировалось beijind; 07.10.2016 в 23:20.
)
Advanced Gang Zones
Draw numbers and borders on the map.
Note: This is an updated version of my old project beaZone - GangZone Numbers & Borders [1.0]
Example how you can make it look like by tweaking some colors and font sizes (image from old NoV gang wars server)
What's new?
Example Usage
Links
Github Link
____________________________
Draw numbers and borders on the map.
Note: This is an updated version of my old project beaZone - GangZone Numbers & Borders [1.0]
Example how you can make it look like by tweaking some colors and font sizes (image from old NoV gang wars server)
What's new?
- New: v2.2.1
- Fixed number 0 and 1.
- v2.2
- Fixed number 7 top part.
- Attempt to make numbers more sexy by tweaking some old settings and adding new ones.
- ShowZoneForPlayer and ShowZoneForAll now have 2 more optional arguments which allow borders and numbers
to be shown in different colors easily without editing the source code.
- v2.1
- New functions to make zone, numbers and borders flash.
- New functions to hide zone for players.
- Fixed minor bugs.
- v2.0
- New functions for more flexible approach.
- Fixed borders collision.
Код:
CreateZone(Float:MinX, Float:MinY, Float:MaxX, Float:MaxY) DestroyZone(zoneid) ShowZoneForPlayer(playerid,zoneid,color,ncolor = ZCOLOR_NUMBER,bcolor = ZCOLOR_BORDER) // ncolor and bcolor are optional ShowZoneForAll(zoneid,color,ncolor = ZCOLOR_NUMBER,bcolor = ZCOLOR_BORDER) // ncolor and bcolor are optional CreateZoneNumber(zoneid,number,Float:numsize = 0.7) // numsize is optional DestroyZoneNumber(zoneid) CreateZoneBorders(zoneid) DestroyZoneBorders(zoneid) // Added in v2.1 HideZoneForPlayer(playerid,zoneid) HideZoneForAll(zoneid) ZoneFlashForPlayer(playerid,zoneid,color) ZoneStopFlashForPlayer(playerid,zoneid) ZoneFlashForAll(zoneid,color) ZoneStopFlashForAll(zoneid) ZoneBordersFlashForPlayer(playerid,zoneid,color) ZoneBordersStopFlashForPlayer(playerid,zoneid) ZoneBordersFlashForAll(zoneid,color) ZoneBordersStopFlashForAll(zoneid) ZoneNumberFlashForPlayer(playerid,zoneid,color) ZoneNumberStopFlashForPlayer(playerid,zoneid) ZoneNumberFlashForAll(zoneid,color) ZoneNumberStopFlashForAll(zoneid)
Example Usage
Код:
new zone; public OnGameModeInit() { zone = CreateZone(1795.871093, 1264.255004, 2035.871093, 1472.255004); CreateZoneBorders(zone); return 1; } public OnPlayerConnect(playerid) { CreateZoneNumber(zone,playerid); // this will create player id number on a gangzone ShowZoneForPlayer(playerid,zone,0xFF000070); ZoneNumberFlashForPlayer(playerid,zoneid,0xFF00FF70); // starts to flash zone number for player return 1; } public OnPlayerDisconnect(playerid,reason) { DestroyZoneNumber(zone); return 1; }
Код:
// This code example is the first picture on the top of the page. new zone,zone2,zone3,zone4; public OnGameModeInit() { // This will create 4 zones in Las Venturas. zone = CreateZone(1513.242919, 1299.813476, 1761.242919, 1587.813476); zone2 = CreateZone(1786.495727, 1447.214843, 2034.495727, 1711.214843); zone3 = CreateZone(1485.881958, 1591.029663, 1781.881958, 1911.029663); zone4 = CreateZone(1794.625854, 1727.273193, 2042.625854, 1951.273193); CreateZoneNumber(zone,16); CreateZoneNumber(zone2,89); CreateZoneNumber(zone3,32); CreateZoneNumber(zone4,54); CreateZoneBorders(zone); CreateZoneBorders(zone2); CreateZoneBorders(zone3); CreateZoneBorders(zone4); return 1; } public OnPlayerConnect(playerid) { ShowZoneForPlayer(playerid,zone,0xd25e00AA,0xff0000aa,0xffe400aa); ShowZoneForPlayer(playerid,zone2,0xff5252AA,0xff0000aa,0xff00f0aa); ShowZoneForPlayer(playerid,zone3,0x686868aa,0xffffffaa,0xffffffaa); ShowZoneForPlayer(playerid,zone4,0x8a00ffaa,0x0090ffaa,0xffffffaa); return 1; }
Links
Github Link
____________________________