2021-05-04, 08:08 PM
2021-05-04: y_zonepulse
This is a tiny little library that does just one thing - makes zones on the mini-map flash.? Make a zone, pass it to the GangZonePulse function, and watch it flash.
Wait, can?t zones already flash with GangZoneFlashForPlayer and GangZoneFlashForAll?? Yes, but that just turns them on and off at a set rate.? This include allows you to specify the two colours they alternate between, how long to take fading between the colours, and how long to pause at each colour:
The first parameter is also a PlayerSet, so can take players, groups, or arrays.
This is a tiny little library that does just one thing - makes zones on the mini-map flash.? Make a zone, pass it to the GangZonePulse function, and watch it flash.
Wait, can?t zones already flash with GangZoneFlashForPlayer and GangZoneFlashForAll?? Yes, but that just turns them on and off at a set rate.? This include allows you to specify the two colours they alternate between, how long to take fading between the colours, and how long to pause at each colour:
Quote:
new zone = GangZoneCreate(-10.0, -10.0, 10.0, 10.0);
// Boring.
GangZoneFlashForPlayer(playerid, zone, COLOUR_RED);
// Better:
//? - Change from red to green over 2 seconds.
//? - Pause at green for half a second.
//? - Change back from green to red over 2 seconds.
//? - Pause at red for half a second.
//? - Repeat.
GangZonePulseForPlayer(playerid, zone, COLOUR_RED, COLOUR_GREEN, 2000, 500);
// Best:
//? - Change from blue to yellow over 5 seconds.
//? - Pause at yellow for 2 seconds.
//? - Change back from yellow to blue almost instanly (1 ms).
//? - Pause at blue for 1 second.
//? - Repeat.
GangZonePulseForPlayer(playerid, zone, COLOUR_RED, COLOUR_GREEN, 5000, 2000, 1, 1000);
The first parameter is also a PlayerSet, so can take players, groups, or arrays.