28.01.2013, 20:58
pawn Код:
Textdraw2 = TextDrawCreate(561.000000, 151.000000, "500[variave]");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 0);
TextDrawSetProportional(Textdraw2, 1);
TextDrawSetShadow(Textdraw2, 1);
new Str[10]; // Mude para a quantidade de valores mбximos da textdraw, exemplo: 123 seria 4 celulas pois o ъltimo valor deve ser nulo :D ( '\0' )
format(Str,sizeof(Str),"%d", Variavel[playerid]); // Variavel a ser utilizada
TextDrawSetString(Textdraw2[playerid], Str2); // Setar o texto da textdraw
TextDrawShowForPlayer(playerid, Textdraw2[playerid]); // Mostrar / atualizar o valor da nossa text
new Str2[10];
format(Str2,sizeof(Str2),"%d", GetPlayerScore(playerid)); // Vamos converter nosso score para um texto
TextDrawSetString(Textdraw2[playerid], Str2); // Setar o texto da textdraw
TextDrawShowForPlayer(playerid, Textdraw2[playerid]); // Mostrar / atualizar o valor da nossa text
// Demos
erros
PHP код:
C:\Users\Richard\Desktop\SAMP 0.3E\gamemodes\E.z.pwn(6630) : error 028: invalid subscript (not an array or too many subscripts): "Textdraw2"
C:\Users\Richard\Desktop\SAMP 0.3E\gamemodes\E.z.pwn(6630) : warning 215: expression has no effect
C:\Users\Richard\Desktop\SAMP 0.3E\gamemodes\E.z.pwn(6630) : error 001: expected token: ";", but found "]"
C:\Users\Richard\Desktop\SAMP 0.3E\gamemodes\E.z.pwn(6630) : error 029: invalid expression, assumed zero
C:\Users\Richard\Desktop\SAMP 0.3E\gamemodes\E.z.pwn(6630) : 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.
PHP код:
TextDrawSetString(Textdraw2[playerid], Str2); // Setar o texto da textdraw