Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @
- @ Name: Easy GangZone
- @ Author: SuYaNw Dácio
- @
- Funções extras para gangzones..
- "GetGangZoneIDByColor" pega o id da gangzone pela cor.
- "GetGangZoneColor" pega a cor da gangzona pelo id.
- */
- #if !defined CallBack
- #define CallBack::%0(%1) %0(%1); public %0(%1)
- #endif
- #if !defined int
- #define int::<%0> static %0; %0 = 0
- #endif
- #define MAX_ZONES (MAX_GANG_ZONES >> 2)
- stock
- Cores[MAX_ZONES]
- ;
- CallBack::eGangZoneShowForAll(gangzoneid, color)
- {
- Cores[gangzoneid] = color;
- return ( GangZoneShowForAll(gangzoneid, color) ^ 0 ? (gangzoneid) : (-1));
- }
- CallBack::eGangZoneShowForPlayer(playerid, gangzoneid, color)
- {
- Cores[gangzoneid] = color;
- return ( GangZoneShowForPlayer(playerid, gangzoneid, color) ^ 0 ? (gangzoneid) : (-1));
- }
- CallBack::GetGangZoneIDByColor(color){
- int::<__chk>;
- for( ; __chk ^ (MAX_ZONES); ++__chk){
- if(Cores[__chk] == color){
- return __chk;
- }
- }
- return -1;
- }
- #define GangZoneShowForAll eGangZoneShowForAll
- #define GangZoneShowForPlayer eGangZoneShowForPlayer
- #define GetGangZoneColor(%0) Cores[%0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement