20.09.2013, 03:08
Preciso de ajuda .-.Bom tenho meu gps mas queria que ele aparecece so quando chegase nas cordenadas quando saisem foram dessa area a textdraw desaparecece como eu faзo iso se puderem ajuda fico agradecido '-'
Код:
forward Gps(playerid); new Text:GpsGangz[MAX_PLAYERS]; new Float:Zones[][GPSInfo] = { { "Gate", -1886.9949,916.5934,35.0156,297.7415, 900.00}, { "PlayBois", -2672.2642,895.9449,79.5547,274.0524, 900.00}, { "noias", -2012.5419,271.7497,32.5714,342.8845, 900.00}, { "Lutadores", -2661.4238,265.5771,4.3359,24.3051, 900.00}, { "Chinesses", -2252.4492,654.5362,49.2969,351.4257, 900.00}, { "CowBois", -708.8004,966.5360,12.4622,239.8707, 900.00} public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); for(new i = 0; i < MAX_PLAYERS; i++){ GpsGangz[i] = TextDrawCreate(142.000000, 362.000000, "_"); TextDrawUseBox(GpsGangz[i], 1); TextDrawBoxColor(GpsGangz[i], 0x00000065); TextDrawTextSize(GpsGangz[i], 633.000000, -19.000000); TextDrawAlignment(GpsGangz[i], 0); TextDrawBackgroundColor(GpsGangz[i], 0x000000FF); TextDrawFont(GpsGangz[i],1); TextDrawLetterSize(GpsGangz[i], 0.270000, 1.000000); TextDrawColor(GpsGangz[i],0xFFFFFFFF); TextDrawSetOutline(GpsGangz[i], 1); TextDrawSetProportional(GpsGangz[i], 1); TextDrawSetShadow(GpsGangz[i], 1); } return 1; } public OnFilterScriptExit() { return 1; } public GpsGanGzones(playerid){ new _str[256]; format(_str, sizeof(_str), "~>~Localizacao:~w~ %s",GetPlayerArea(playerid)); TextDrawSetString(GpsGangz[playerid], _str); return 1; } stock GetPlayerArea(playerid){ new str[130]; format(str,sizeof(str), "%s", Zones[GetPlayerZone(playerid)][zone_name]); return str; } stock GetPlayerZone(playerid){ new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); for(new i = 0; i<sizeof(Zones); i++){ if(x > Zones[i][zone_minx] && y > Zones[i][zone_miny] && z > Zones[i][zone_minz] && x < Zones[i][zone_maxx] && y < Zones[i][zone_maxy] && z < Zones[i][zone_maxz]) return i; } return false; }