SA-MP Forums Archive
GangZone Color and Base Color problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: GangZone Color and Base Color problem (/showthread.php?tid=508953)



GangZone Color and Base Color problem - Xessive - 24.04.2014

Hello,

I have a team base for Australia (Desert Airport) whose colors are not appearing. Its supposed to be green.

The capture zone (Big Ear) has green color instead of grey.

Its a small but annoying problem, if anyone can fix this, add me on skype: ahmedhassan754 and I'll send you the .pwn file.



Thanks in advance !


Re: GangZone Color and Base Color problem - Galletziz - 24.04.2014

Post you definitions of your function for create zones.


Re: GangZone Color and Base Color problem - Xessive - 24.04.2014

Quote:
Originally Posted by Galletziz
Посмотреть сообщение
Post you definitions of your function for create zones.
These are all the lines related to capture zones.

Quote:

//Capture Zones

new PlayerCount[MAX_PLAYERS];
new PlayerCountTimer[MAX_PLAYERS];
new PlayerMoneyCountTimer[MAX_PLAYERS];

new BigEarZone;
new BigEarArea;
new BigEarCP;
new BigEarColor;

new SFZone;
new SFArea;
new SFCP;
new SFColor;

new BSZone;
new BSArea;
new BSCP;
new BSColor;


new ARMYZone;
new ARMYArea;
new ARMYCP;
new ARMYColor;

new PETROLZone;
new PETROLArea;
new PETROLCP;
new PETROLColor;

//gas station
new DESERTZone;
new DESERTArea;
new DESERTCP;
new DESERTColor;

//Quarry
new QUARRYZone;
new QUARRYArea;
new QUARRYCP;
new QUARRYColor;

//guesthouse
new GUESTZone;
new GUESTArea;
new GUESTCP;
new GUESTColor;

Quote:

//big ear
BigEarZone = GangZoneCreate(-437.5,1513.671875,-244.140625,1636.71875);
BigEarArea = CreateDynamicRectangle(-437.5,1513.671875,-244.140625,1636.71875, -1, -1, -1);
BigEarCP = CreateDynamicCP(-311.0136,1542.9733,75.5625,3, -1,-1,-1,100.0);
BigEarColor = GREY;

//snake farm
SFZone = GangZoneCreate(-62.5000000000005,2318.359375,23.4375,2390.625);
SFArea = CreateDynamicRectangle(-62.5000000000005,2318.359375,23.4375,2390.625, -1, -1, -1);
SFCP = CreateDynamicCP(-36.5458, 2347.6426, 24.1406,3, -1,-1,-1,100.0);
SFColor = GREY;

//Bay Side
BSZone = GangZoneCreate(236.328125,2892.578125,292.96875,29 43.359375);
BSArea = CreateDynamicRectangle(236.328125,2892.578125,292. 96875,2943.359375, -1, -1, -1);
BSCP = CreateDynamicCP(260.0900,2889.5242,11.1854,3, -1,-1,-1,100.0);
BSColor = GREY;

ARMYZone = GangZoneCreate(-617.1875,2531.25,-455.078125,2658.203125);
ARMYArea = CreateDynamicRectangle(-617.1875,2531.25,-455.078125,2658.203125, -1, -1, -1);
ARMYCP = CreateDynamicCP(-551.6992,2593.0771,53.9348,3, -1,-1,-1,100.0);
ARMYColor = GREY;

PETROLZone = GangZoneCreate(609.375,1652.34375,714.84375,1767.5 78125);
PETROLArea = CreateDynamicRectangle(609.375,1652.34375,714.8437 5,1767.578125, -1, -1, -1);
PETROLCP = CreateDynamicCP(670.9215,1705.4658,7.1875,3, -1,-1,-1,100.0);
PETROLColor = GREY;


//gas station
DESERTZone = GangZoneCreate(529.296875,1205.078125,636.71875,12 67.578125);
DESERTArea = CreateDynamicRectangle(529.296875,1205.078125,636. 71875,1267.578125, -1, -1, -1);
DESERTCP = CreateDynamicCP(558.9932,1221.8896,11.7188,3, -1,-1,-1,100.0);
DESERTColor = GREY;

//Quarry
QUARRYZone = GangZoneCreate(439.453125,748.046875,863.28125,992 .1875);
QUARRYArea = CreateDynamicRectangle(439.453125,748.046875,863.2 8125,992.1875, -1, -1, -1);
QUARRYCP = CreateDynamicCP(588.3246,875.7402,-42.4973,3, -1,-1,-1,100.0);
QUARRYColor = GREY;

//guesthouse
GUESTZone = GangZoneCreate(-357.421875,1707.03125,-253.90625,1835.9375);
GUESTArea = CreateDynamicRectangle(-357.421875,1707.03125,-253.90625,1835.9375, -1, -1, -1);
GUESTCP = CreateDynamicCP(-314.8433,1773.9176,43.6406,3, -1,-1,-1,100.0);
GUESTColor = GREY;
Quote:

stock SetZoneColor(zonename, playerid)
{
if(zonename == BigEarZone)
{
BigEarColor = PlayerGangColor(playerid);
}
if(zonename == SFZone)
{
SFColor = PlayerGangColor(playerid);
}
if(zonename == BSZone)
{
BSColor = PlayerGangColor(playerid);
}
if(zonename == ARMYZone)
{
ARMYColor = PlayerGangColor(playerid);
}
if(zonename == PETROLZone)
{
PETROLColor = PlayerGangColor(playerid);
}
if(zonename == DESERTZone)
{
DESERTColor = PlayerGangColor(playerid);
}
if(zonename == QUARRYZone)
{
QUARRYColor = PlayerGangColor(playerid);
}
if(zonename == GUESTZone)
{
GUESTColor = PlayerGangColor(playerid);
}
}

stock ZoneName(checkpointid)
{

new str[32];
if (checkpointid == BigEarCP) str = ("Big Ear");
else if(checkpointid == SFCP) str = ("Snake's Farm");
else if(checkpointid == BSCP) str = ("Bay Side Sea Shore");
else if(checkpointid == ARMYCP) str = ("Army Petrol Bunk");
else if(checkpointid == PETROLCP) str = ("Army Petrol Bunk");
else if(checkpointid == DESERTCP) str = ("Gas Station");
else if(checkpointid == QUARRYCP) str = ("Quarry");
else if(checkpointid == GUESTCP) str = ("Army Guest House");

return str;
}
Quote:

}

if(checkpointid == SFCP || checkpointid == BSCP || checkpointid == BigEarCP || checkpointid == ARMYCP || checkpointid == PETROLCP || checkpointid == DESERTCP || checkpointid == QUARRYCP || checkpointid == GUESTCP)
{

//Messages InCase The Player Is Not Allowed To Capture
new string[128], pZone;
//If The ZONE is Already Getting Captured
if(CaptureZoneInfo[checkpointid][gAttacked] == 1)
return SendClientMessage(playerid, RED, "The zone is being captured!");
//If The Zone Has Been Already Captured By That Team
if(CaptureZoneInfo[checkpointid][gOwner] == gTeam[playerid])
return SendClientMessage(playerid, LIGHTBLUE, "Your team owns this zone.");
//Wether The Player is in a vehicle
if(IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, RED, "You cant capture while in a vehicle!");
//Wether The Player Is ON Duty(To BE SET)
if(Ainfo[playerid][OnDuty] == 1)
return SendClientMessage(playerid, RED, "You cant capture when on duty!");

CaptureZoneInfo[checkpointid][gAttacked] = 1;
pZone = PlayerArea(playerid);
pInfo[playerid][pCaptureZone] = 1;



Re: GangZone Color and Base Color problem - Galletziz - 24.04.2014

I don't see, the function that allow you to see the gang zones.. (GangZoneShowForAll(zoneid,color)) or (GangZoneShowForPlayer(playerid,zoneid,color))..