All pastes #730676 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-09 12:49 UTC
rendered paste body
// ongamemodeinit>

	zoneot = SetTimer("UpdateZoneNames",1000,1);
	
	zoneo = TextDrawCreate(350.0,400.0," ");
	TextDrawAlignment(zoneo,0);
	TextDrawBackgroundColor(zoneo,0x000000ff);
	TextDrawFont(zoneo,0);
	TextDrawLetterSize(zoneo,1.0,3.0);
	TextDrawColor(zoneo,0xffffffcc);
	TextDrawSetOutline(zoneo,1);
	TextDrawSetProportional(zoneo,1);
	TextDrawSetShadow(zoneo,1);

// spawn

show textdrawfor player..

// function

public UpdateZoneNames(playerid)
{
	new string[12];
	new Float:x, Float:y, Float:z;
	GetPlayerPos(playerid,x,y,z);
	for(new i = 0; i < sizeof(ZoneInfo); i++)
	{
 		if(x >= ZoneInfo[i][zMinX] && x < ZoneInfo[i][zMaxX] && y>= ZoneInfo[i][zMinY] && y < ZoneInfo[i][zMaxY])
		{
			format(string, sizeof(string),"%s Territory",ZoneInfo[i][zColor]);
			TextDrawSetString(zoneo, string);
		}
	}
}