SA-MP Forums Archive
Army area? - 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: Army area? (/showthread.php?tid=581731)



Army area? - 123bob123 - 15.07.2015

How to make an area like this, as like the purple thing?

Pic:





Re: Army area? - MBilal - 15.07.2015

use any of the Gangzone editor to make the zone.

https://sampforum.blast.hk/showthread.php?tid=311553

https://sampforum.blast.hk/showthread.php?tid=119157

https://sampforum.blast.hk/showthread.php?tid=467190


Re: Army area? - 123bob123 - 15.07.2015

I used this: https://sampforum.blast.hk/showthread.php?tid=467190

I've made the area but how can i change the color of the area cause it seems its stood defualt?


Re: Army area? - MBilal - 15.07.2015

GangZoneShowForAll(here gang zone game , here gang zone color);


Re: Army area? - 123bob123 - 15.07.2015

Code:

Код:
#include <a_samp>
#include <streamer>

#define MAX_ZONES 1

new zones[MAX_ZONES];
new Float:zones_points_0[] = {
	2676.0,-2394.0,2806.0,-2394.0,2807.0,-2581.0,2676.0,-2581.0,2676.0,-2394.0
};
new zones_text[MAX_ZONES][64] = {
	"Army area"
};


public OnFilterScriptInit() {
	print("--------------------------------------");
	print("GTA SA Zone Editor by Grimrandomer - Exporter");
	print("--------------------------------------");

	zones[0] = CreateDynamicPolygon(zones_points_0);

	return 1;
}

public OnFilterScriptExit() {
	return 1;
}

public OnPlayerEnterDynamicArea(playerid, areaid) {
	for (new zone=0; zone<MAX_ZONES; zone++) {
		if (areaid==zones[zone]) {
			new msg[90];
			format(msg, 90, "Entering the army zone... %s", zones_text[zone]);
			SendClientMessage(playerid, 0xFFFFFFFF, msg);
		}
	}
	return 1;
}

public OnPlayerLeaveDynamicArea(playerid, areaid) {
	for (new zone=0; zone<MAX_ZONES; zone++) {
		if (areaid==zones[zone]) {
			new msg[90];
			format(msg, 90, "Leaving the army zone... %s", zones_text[zone]);
			SendClientMessage(playerid, 0xFFFFFFFF, msg);
		}
	}
	return 1;
}
where should i put it?


Re: Army area? - 123bob123 - 15.07.2015

anyone pls


Re: Army area? - MBilal - 15.07.2015

Quote:
Originally Posted by 123bob123
Посмотреть сообщение
Code:

Код:
#include <a_samp>
#include <streamer>

#define MAX_ZONES 1

new zones[MAX_ZONES];
new Float:zones_points_0[] = {
	2676.0,-2394.0,2806.0,-2394.0,2807.0,-2581.0,2676.0,-2581.0,2676.0,-2394.0
};
new zones_text[MAX_ZONES][64] = {
	"Army area"
};


public OnFilterScriptInit() {
	print("--------------------------------------");
	print("GTA SA Zone Editor by Grimrandomer - Exporter");
	print("--------------------------------------");

	zones[0] = CreateDynamicPolygon(zones_points_0);

	return 1;
}

public OnFilterScriptExit() {
	return 1;
}

public OnPlayerEnterDynamicArea(playerid, areaid) {
	for (new zone=0; zone<MAX_ZONES; zone++) {
		if (areaid==zones[zone]) {
			new msg[90];
			format(msg, 90, "Entering the army zone... %s", zones_text[zone]);
			SendClientMessage(playerid, 0xFFFFFFFF, msg);
		}
	}
	return 1;
}

public OnPlayerLeaveDynamicArea(playerid, areaid) {
	for (new zone=0; zone<MAX_ZONES; zone++) {
		if (areaid==zones[zone]) {
			new msg[90];
			format(msg, 90, "Leaving the army zone... %s", zones_text[zone]);
			SendClientMessage(playerid, 0xFFFFFFFF, msg);
		}
	}
	return 1;
}
where should i put it?
You can use this as FS but if you want to put in GM copy all the code and put in GM.
/*
remove this
public OnFilterScriptInit() {
print("--------------------------------------");
print("GTA SA Zone Editor by Grimrandomer - Exporter");
print("--------------------------------------");

zones[0] = CreateDynamicPolygon(zones_points_0);

return 1;
}
*/

put it under OnGameModeInt
zones[0] = CreateDynamicPolygon(zones_points_0);


Re: Army area? - 123bob123 - 15.07.2015

Errors:

Quote:

SA-MP Server\gamemodes\grandlarc.pwn(359) : error 017: undefined symbol "Army"
SA-MP Server\gamemodes\grandlarc.pwn(359) : error 017: undefined symbol "area"
SA-MP Server\gamemodes\grandlarc.pwn(359) : error 029: invalid expression, assumed zero
SA-MP Server\gamemodes\grandlarc.pwn(359) : fatal error 107: too many error messages on one line




Re: Army area? - MBilal - 15.07.2015

Did you put this at the Top of GM>?

#define MAX_ZONES 1

new zones[MAX_ZONES];
new Float:zones_points_0[] = {
2676.0,-2394.0,2806.0,-2394.0,2807.0,-2581.0,2676.0,-2581.0,2676.0,-2394.0
};
new zones_text[MAX_ZONES][64] = {
"Army area"
};


Re: Army area? - 123bob123 - 15.07.2015

yes i did