All pastes #823458 Raw Edit

Something

public cpp v1 · immutable
·published 2007-12-19 11:44 UTC
rendered paste body
new	Text:gZoneTextIDs[ MAX_SCRIPT_ZONES ],	Text:gPlayerZoneText[ MAX_PLAYERS ],	Text:TEXT_BallaZone,	Text:TEXT_GroveZone;	//..	public OnGameModeInit( ){	TEXT_BallaZone = TextDrawCreate( "Ballas Territory", 0.0, 0.0 );	TEXT_GroveZone = TextDrawCreate( "Grove Territory", 0.0, 0.0 );		gZoneTextIDs[ ballazoneid ] = TEXT_BallaZone;	gZoneTextIDs[ grovezoneid ] = TEXT_GroveZone;		return 1;}public UpdateZoneNames(){	new string[128];	for(new j=0; j<MAX_PLAYERS; j++)	{        new IsInZone = 0;		if(IsPlayerConnected(j))		{			new Float:x, Float:y, Float:z;			GetPlayerPos(j,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])				{				    if ( gPlayerZoneText[ j ] != INVALID_TEXT_DRAW )				        break;				        				    // player in this zone, i is the zoneid..				    gPlayerZoneText[ j ] = gZoneTextIDs[ i ];				    TextDrawShowForPlayer( playerid, gZoneTextIDs[ i ] );				//	format(string, sizeof(string),"%s Territory",ZoneInfo[i][zColor]);				//	TextDrawSetString(ZoneTextDraws,string);					IsInZone = 1;                    break;				}			}            if(!IsInZone)			{			    TextDrawHideForPlayer( playerid, gPlayerZoneText[ j ] );			    gPlayerZoneText[ j ] = INVALID_TEXT_DRAW;			  //  TextDrawSetString(ZoneTextDraws, " ");            }		}	}}