Quote:
Originally Posted by Murilo_sousa
pawn Код:
#include <a_samp>
new Text:Local;
public OnFilterScriptInit() { Local = TextDrawCreate(318.000000, 430.000000, "_"); TextDrawAlignment(Local, 2); TextDrawBackgroundColor(Local, -16776961); TextDrawFont(Local, 3); TextDrawLetterSize(Local, 0.480000, 1.600000); TextDrawColor(Local, -1); TextDrawSetOutline(Local, 1); TextDrawSetProportional(Local, 1);
return 1; }
public OnFilterScriptExit() { TextDrawHideForAll(Local); return 1; }
public OnPlayerUpdate(playerid) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); if(X >= 815 && X <= 3000 && Y >= 717 && Y <= 3000) { TextDrawHideForPlayer(playerid, Local); TextDrawSetString(Local, "~b~Las Venturas"); TextDrawShowForPlayer(playerid, Local); } if(X < 0) { TextDrawHideForPlayer(playerid, Local); TextDrawSetString(Local, "~b~San Fierro"); TextDrawShowForPlayer(playerid, Local); } if(X > 0 && Y < 0) { TextDrawHideForPlayer(playerid, Local); TextDrawSetString(Local, "~b~Los Santos"); TextDrawShowForPlayer(playerid, Local); } if(!(X >= 815 && X <= 3000 && Y >= 717 && Y <= 3000) && !(X < 0) && !(X > 0 && Y < 0)) { TextDrawHideForPlayer(playerid, Local); TextDrawSetString(Local, "~b~San Andreas"); TextDrawShowForPlayer(playerid, Local); } return 1; }
Nгo intendi muito como se usa mais textdraw's usando SetString do que criando vбrias td's idкnticas, ( Cor / Modelo )
|
Hб altas chances de isso mostrar um texto errado, alйm de criar 3 draws ser mais otimizado.
Jб corrigi o que eu havia dito sobre as 1500, o certo seria 500. Nгo sei de onde tirei 1500, XD