wired showing gangzone
#1

Hi all, today i want to create an gangzone system but i have this problem.

i created the names of gangzones
Код:
// gang zone
	new GZ_ZONE1;
	new GZ_ZONE2;
	new GZ_ZONE3;
	new GZ_ZONE4;
	new GZ_ZONE5;
	new GZ_ZONE6;
	new GZ_ZONE7;
	new GZ_ZONE8;
	new GZ_ZONE9;
	new GZ_ZONE10;
///
after i create the gangzones

Код:
	GZ_ZONE1 = GangZoneCreate(23.4375,-2121.09375,943.359375,-1394.53125);
	GZ_ZONE2 = GangZoneCreate(943.359375,-2865.234375,1875,-1792.96875);
	GZ_ZONE3 = GangZoneCreate(29.296875,-1388.671875,925.78125,-697.265625);
	GZ_ZONE4 = GangZoneCreate(925.78125,-1412.109375,1582.03125,-714.84375);
	GZ_ZONE5 = GangZoneCreate(943.359375,-1792.96875,1851.5625,-1417.96875);
	GZ_ZONE6 = GangZoneCreate(1582.03125,-1406.25,2250,-714.84375);
	GZ_ZONE7 = GangZoneCreate(1898.4375,-2830.078125,2496.09375,-1810.546875);
	GZ_ZONE8 = GangZoneCreate(2255.859375,-1412.109375,2982.421875,-720.703125);
	GZ_ZONE9 = GangZoneCreate(1863.28125,-1839.84375,2988.28125,-1417.96875);
	GZ_ZONE10 = GangZoneCreate(2513.671875,-2777.34375,2976.5625,-1845.703125);
and the last step i create an command wich show me the gang zone

Код:
CMD:zonewar(playerid, params[])
{
	new item[MAX_PLAYERS];
    if(sscanf(params,"s[10]",item[playerid])) return SendClientMessage(playerid, 0xFF0000FF,"Comanda gresita. Corect este: /zonewar [on/off]");
    if (strcmp("on", item[playerid], true, 2) == 0)
		{
			GangZoneShowForPlayer(playerid, GZ_ZONE1, 0x00FFFFFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE2, 0x71C7FFFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE3, 0xFFFF8CFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE4, 0xFFB78CFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE5, 0xFFB7DDFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE6, 0x67B7DDFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE7, 0x67B767FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE8, 0xE29767FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE9, 0xE256C1FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE10, 0xA356C1FF);
		}
	else if (strcmp("off", item[playerid], true, 3) == 0)
		{
			GangZoneHideForPlayer(playerid,GZ_ZONE1);
			GangZoneHideForPlayer(playerid,GZ_ZONE2);
			GangZoneHideForPlayer(playerid,GZ_ZONE3);
			GangZoneHideForPlayer(playerid,GZ_ZONE4);
			GangZoneHideForPlayer(playerid,GZ_ZONE5);
			GangZoneHideForPlayer(playerid,GZ_ZONE6);
			GangZoneHideForPlayer(playerid,GZ_ZONE7);
			GangZoneHideForPlayer(playerid,GZ_ZONE8);
			GangZoneHideForPlayer(playerid,GZ_ZONE9);
			GangZoneHideForPlayer(playerid,GZ_ZONE10);
		}
	return 1;
}
but the effect is wired, look -> http://i.imgur.com/kdYVqbB.jpg

This 10 gangzone cover all los santos.
Reply
#2


I think this code below is only Small box on picture, Try to make more gang zone, Using Debug


Код:
	GZ_ZONE1 = GangZoneCreate(23.4375,-2121.09375,943.359375,-1394.53125);
	GZ_ZONE2 = GangZoneCreate(943.359375,-2865.234375,1875,-1792.96875);
	GZ_ZONE3 = GangZoneCreate(29.296875,-1388.671875,925.78125,-697.265625);
	GZ_ZONE4 = GangZoneCreate(925.78125,-1412.109375,1582.03125,-714.84375);
	GZ_ZONE5 = GangZoneCreate(943.359375,-1792.96875,1851.5625,-1417.96875);
	GZ_ZONE6 = GangZoneCreate(1582.03125,-1406.25,2250,-714.84375);
	GZ_ZONE7 = GangZoneCreate(1898.4375,-2830.078125,2496.09375,-1810.546875);
	GZ_ZONE8 = GangZoneCreate(2255.859375,-1412.109375,2982.421875,-720.703125);
	GZ_ZONE9 = GangZoneCreate(1863.28125,-1839.84375,2988.28125,-1417.96875);
	GZ_ZONE10 = GangZoneCreate(2513.671875,-2777.34375,2976.5625,-1845.703125);
Try to make a Box Checkpoint on debug and make more gang zone

Код:
	GZ_ZONE1 = GangZoneCreate(23.4375,-2121.09375,943.359375,-1394.53125);
	GZ_ZONE2 = GangZoneCreate(943.359375,-2865.234375,1875,-1792.96875);
	GZ_ZONE3 = GangZoneCreate(29.296875,-1388.671875,925.78125,-697.265625);
	GZ_ZONE4 = GangZoneCreate(925.78125,-1412.109375,1582.03125,-714.84375);
	GZ_ZONE5 = GangZoneCreate(943.359375,-1792.96875,1851.5625,-1417.96875);
	GZ_ZONE6 = GangZoneCreate(1582.03125,-1406.25,2250,-714.84375);
	GZ_ZONE7 = GangZoneCreate(1898.4375,-2830.078125,2496.09375,-1810.546875);
	GZ_ZONE8 = GangZoneCreate(2255.859375,-1412.109375,2982.421875,-720.703125);
	GZ_ZONE9 = GangZoneCreate(1863.28125,-1839.84375,2988.28125,-1417.96875);
	GZ_ZONE10 = GangZoneCreate(2513.671875,-2777.34375,2976.5625,-1845.703125);
        GZ_ZONE11=GangZoneCreate (Use debug to fill this)
        GZ_ZONE12=GangZoneCreate (Use debug to fill this)
        GZ_ZONE13=GangZoneCreate (Use debug to fill this)
        GZ_ZONE14=GangZoneCreate (Use debug to fill this)
Код:
// gang zone
	new GZ_ZONE1;
	new GZ_ZONE2;
	new GZ_ZONE3;
	new GZ_ZONE4;
	new GZ_ZONE5;
	new GZ_ZONE6;
	new GZ_ZONE7;
	new GZ_ZONE8;
	new GZ_ZONE9;
	new GZ_ZONE10;
        new GZ_ZONE11;
        new GZ_ZONE12;
        new GZ_ZONE13;
        new GZ_ZONE14;
///
Код:
CMD:zonewar(playerid, params[])
{
	new item[MAX_PLAYERS];
    if(sscanf(params,"s[10]",item[playerid])) return SendClientMessage(playerid, 0xFF0000FF,"Comanda gresita. Corect este: /zonewar [on/off]");
    if (strcmp("on", item[playerid], true, 2) == 0)
		{
			GangZoneShowForPlayer(playerid, GZ_ZONE1, 0x00FFFFFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE2, 0x71C7FFFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE3, 0xFFFF8CFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE4, 0xFFB78CFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE5, 0xFFB7DDFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE6, 0x67B7DDFF);
			GangZoneShowForPlayer(playerid, GZ_ZONE7, 0x67B767FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE8, 0xE29767FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE9, 0xE256C1FF);
			GangZoneShowForPlayer(playerid, GZ_ZONE10, 0xA356C1FF);
		}
	else if (strcmp("off", item[playerid], true, 3) == 0)
		{
			GangZoneHideForPlayer(playerid,GZ_ZONE1);
			GangZoneHideForPlayer(playerid,GZ_ZONE2);
			GangZoneHideForPlayer(playerid,GZ_ZONE3);
			GangZoneHideForPlayer(playerid,GZ_ZONE4);
			GangZoneHideForPlayer(playerid,GZ_ZONE5);
			GangZoneHideForPlayer(playerid,GZ_ZONE6);
			GangZoneHideForPlayer(playerid,GZ_ZONE7);
			GangZoneHideForPlayer(playerid,GZ_ZONE8);
			GangZoneHideForPlayer(playerid,GZ_ZONE9);
			GangZoneHideForPlayer(playerid,GZ_ZONE10);
			GangZoneHideForPlayer(playerid,GZ_ZONE11);
			GangZoneHideForPlayer(playerid,GZ_ZONE12);
			GangZoneHideForPlayer(playerid,GZ_ZONE13);
			GangZoneHideForPlayer(playerid,GZ_ZONE14);
		}
	return 1;
}
Reply
#3

i think that i don't understand... how can i use debug?
Reply
#4

Quote:
Originally Posted by moof2010
Посмотреть сообщение
i think that i don't understand... how can i use debug?
If you want to learn how to use DEBUG, You can read Debug Wiki by Clicking me
Reply
#5

on, i read it now tell me how can i use it for fill there fields?


You wanna mean that to use save for saving position and above to fill the coordonate there?
Reply
#6

sombody?
Reply
#7

I do researchs and i find that that zone is tunde_iarba_zona[0] = GangZoneCreate(776.8536,-1220.4283, 734.6541,-1308.4094); from my script.

i rewrite the code with

Код:
// gang zone
	new war_ZONE1;
	new war_ZONE2;
	new war_ZONE3;
	new war_ZONE4;
	new war_ZONE5;
	new war_ZONE6;
	new war_ZONE7;
	new war_ZONE8;
	new war_ZONE9;
	new war_ZONE10;
	new war_ZONE11;
	new war_ZONE12;
	new war_ZONE13;
///
Код:
    //gang zone
	war_ZONE1 = GangZoneCreate(76.7557,-2146.7163,525.7557,-1414.7163);
	war_ZONE2 = GangZoneCreate(525.7557,-2146.7163,1012.7557,-1414.7163);
	war_ZONE3 = GangZoneCreate(1012.7557,-2764.7163,1791.7557,-1853.7163);
	war_ZONE4 = GangZoneCreate(1012.7557,-1853.7163,1791.7557,-1414.7163);
	war_ZONE5 = GangZoneCreate(1791.7557,-2764.7163,2916.0000,-2146.7163);
	war_ZONE6 = GangZoneCreate(1791.7557,-2146.7163,2381.5313,-1414.7163);
	war_ZONE7 = GangZoneCreate(2381.5313,-2146.7163,2916.0000,-1414.7163);
	war_ZONE8 = GangZoneCreate(2192.2344,-1414.7163,2916.0000,-760.8413);
	war_ZONE9 = GangZoneCreate(1548.3594,-1414.7163,2192.2344,-760.8413);
	war_ZONE10 = GangZoneCreate(1012.7557,-1414.7163,1548.3594,-759.9351);
	war_ZONE11 = GangZoneCreate(525.7557,-1414.7163,1012.7557,-759.9351);
	war_ZONE12 = GangZoneCreate(76.7557,-1414.7163,525.7557,-759.9351);
	war_ZONE13 = GangZoneCreate(409.4688,-759.9351,1605.4688,-358.8101);
	//==============================================================================
Код:
//zonewar
CMD:zonewar(playerid, params[])
{
	new item[MAX_PLAYERS];
    if(sscanf(params,"s[10]",item[playerid])) return SendClientMessage(playerid, 0xFF0000FF,"Comanda gresita. Corect este: /zonewar [on/off]");
    if (strcmp("on", item[playerid], true, 2) == 0)
		{
			GangZoneShowForPlayer(playerid, war_ZONE1, 0x00FFFFFF);
			GangZoneShowForPlayer(playerid, war_ZONE2, 0x71C7FFFF);
			GangZoneShowForPlayer(playerid, war_ZONE3, 0xFFFF8CFF);
			GangZoneShowForPlayer(playerid, war_ZONE4, 0xFFB78CFF);
			GangZoneShowForPlayer(playerid, war_ZONE5, 0xFFB7DDFF);
			GangZoneShowForPlayer(playerid, war_ZONE6, 0x67B7DDFF);
			GangZoneShowForPlayer(playerid, war_ZONE7, 0x67B767FF);
			GangZoneShowForPlayer(playerid, war_ZONE8, 0xE29767FF);
			GangZoneShowForPlayer(playerid, war_ZONE9, 0xE256C1FF);
			GangZoneShowForPlayer(playerid, war_ZONE10, 0xA356C1FF);
			GangZoneShowForPlayer(playerid, war_ZONE11, 0xE29767FF);
			GangZoneShowForPlayer(playerid, war_ZONE12, 0xE256C1FF);
			GangZoneShowForPlayer(playerid, war_ZONE13, 0xA356C1FF);
		}
	else if (strcmp("off", item[playerid], true, 3) == 0)
		{
			GangZoneHideForPlayer(playerid,war_ZONE1);
			GangZoneHideForPlayer(playerid,war_ZONE2);
			GangZoneHideForPlayer(playerid,war_ZONE3);
			GangZoneHideForPlayer(playerid,war_ZONE4);
			GangZoneHideForPlayer(playerid,war_ZONE5);
			GangZoneHideForPlayer(playerid,war_ZONE6);
			GangZoneHideForPlayer(playerid,war_ZONE7);
			GangZoneHideForPlayer(playerid,war_ZONE8);
			GangZoneHideForPlayer(playerid,war_ZONE9);
			GangZoneHideForPlayer(playerid,war_ZONE10);
			GangZoneHideForPlayer(playerid,war_ZONE11);
			GangZoneHideForPlayer(playerid,war_ZONE12);
			GangZoneHideForPlayer(playerid,war_ZONE13);
		}
	return 1;
}
//==============================================================================
why when i write /zonewar on it show me tunde_iarba_zona[0] ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)