SA-MP Forums Archive
Gang Zone - 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: Gang Zone (/showthread.php?tid=648035)



Gang Zone - Longover - 14.01.2018

Help
with my public:
Код:
public LoadGangTeritory()
{
	for(new gID = 0; gID < MAX_GANGS; gID++)
	{
	    Zone[gID][MinX]   	 = cache_get_field_content_float(gID, "MinY", DB_Connect);
	    Zone[gID][MaxX]   	 = cache_get_field_content_float(gID, "MaxX", DB_Connect);
	    Zone[gID][MinY]   	 = cache_get_field_content_float(gID, "MinY", DB_Connect);
	    Zone[gID][MaxY]   	 = cache_get_field_content_float(gID, "MaxY", DB_Connect);
	    //----------------------------------------------------------------------
//	    Zone[gID][Teritory]  = GangZoneCreate(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
	    //----------------------------------------------------------------------
   		Gang[gID][CaptureX]  = cache_get_field_content_float(gID, "CaptureX", DB_Connect);
		Gang[gID][CaptureY]  = cache_get_field_content_float(gID, "CaptureY", DB_Connect);
		Gang[gID][CaptureZ]  = cache_get_field_content_float(gID, "CaptureZ", DB_Connect);
		//----------------------------------------------------------------------
		Zone[gID][ID] = GangZoneCreate(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
		//----------------------------------------------------------------------
		CreateDynamicRectangle(Zone[gID][MinX], Zone[gID][MinY], Zone[gID][MaxX], Zone[gID][MaxY]);
		//----------------------------------------------------------------------
	}
	return 1;
}
When i'm enter in game the gang zone not appeared->
Coordonates:
Код:
MinX:-1741.76
MaxX: 1517.49
MinY:-1585.73
MaxY:1701.58
The coords is for Los Santos Police Departament
I'm put LoadGangTeritory() in OnGamemodeInit but not working....
+1 for help!