Ayuda Con TextDraw
#1

Hola
Les Vengo a Pedir Ayuda Para Colocar un TextDraw.
Queria Poner El Nivel del Jugador en TextDraw.
Ya Tengo La Ubicacion del TextDraw.
Porfavor, Ayudenme! please!! xD!
Reply
#2

No se que es lo que quieres exactamente, pero creo que esto te puede ayudar:

pawn Код:
new
  string[12];

format(string, sizeof(string), "Nivel: %d", a);
TextDrawSetString(b, string);

// a == variable que contiene el nivel del jugador
// b == textdraw al que quieres asignarle "Nivel: Nє"
// Si quieres que se muestre el textdraw usa TextDrawShowForPlayer(playerid, b); recordando lo que es "b"
Reply
#3

Y Donde Pongo eso?
Reply
#4

Quote:
Originally Posted by Roymer
Y Donde Pongo eso?
Obviamente, donde quieras que se actualize el nivel con el textdraw... yo lo harнa cada vez que se establece o cambia el nivel.
Reply
#5

Es que lo Coloco Cuando Pones /Cuenta ( Te muestra tus stats ) (En la callback ShowStats ) Y me da error: Undefined symbol: TextDrawNivel (ID del TextDraw) y eso que pongo new text:TextDrawNivel[MAX_PLAYERS]

Alguna Otra Ubicacion?
Reply
#6

pawn Код:
TextDrawShowForPlayer(playerid, TextDrawNivel[playerid]);
pawn Код:
public ShowStats(playerid)
{
  new string[12];

  format(string, sizeof(string), "Nivel: %d", vardelnivel);
  TextDrawSetString(TextDrawNivel[playerid], string);
  TextDrawShowForPlayer(playerid, TextDrawNivel[playerid]);
  return 1;
}
Adivinando como es el callback...
Reply
#7

pawn Код:
C:\Documents and Settings\Pierson\Escritorio\Servidor\gamemodes\Rg.pwn(14977) : error 017: undefined symbol "TextDrawNivel"
C:\Documents and Settings\Pierson\Escritorio\Servidor\gamemodes\Rg.pwn(14977) : warning 215: expression has no effect
C:\Documents and Settings\Pierson\Escritorio\Servidor\gamemodes\Rg.pwn(14977) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Pierson\Escritorio\Servidor\gamemodes\Rg.pwn(14977) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Pierson\Escritorio\Servidor\gamemodes\Rg.pwn(14977) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
linea: TextDrawSetString(TextDrawNivel[playerid], string);

Todo lo que Tengo:
Arriba de Todo el GM:
pawn Код:
new Text:TextdrawNivel[MAX_PLAYERS];//
En la Callback OnPlayerConnect:
pawn Код:
TextdrawNivel[playerid] = TextDrawCreate(37.000000, 334.000000, " ");
    TextDrawBackgroundColor(TextdrawNivel[playerid], 255);
    TextDrawFont(TextdrawNivel[playerid], 1);
    TextDrawLetterSize(TextdrawNivel[playerid], 0.280000, 1.000000);
    TextDrawColor(TextdrawNivel[playerid], -1);
    TextDrawSetOutline(TextdrawNivel[playerid], 0);
    TextDrawSetProportional(TextdrawNivel[playerid], 1);
    TextDrawSetShadow(TextdrawNivel[playerid], 1);
En la Calback OnPlayerDisconnect:
pawn Код:
TextDrawDestroy(TextdrawNivel[playerid]);
y Ya :S
Reply
#8

...

TextDrawNivel[playerid] es muy diferente a TextdrawNivel[playerid]...

pawn Код:
public ShowStats(playerid)
{
  new string[12];

  format(string, sizeof(string), "Nivel: %d", vardelnivel);
  TextDrawSetString(TextdrawNivel[playerid], string);
  TextDrawShowForPlayer(playerid, TextdrawNivel[playerid]);
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)