[Ajuda] O que eu fiz de errado? Textdraw
#1

O que eu fiz de errado em meu textdraw? N ta funcionando =\

No topo do GM
pawn Код:
new Text:ptdname;
new Text:ptdlevel;
new Text:ptdwanted;
new Text:ptdpoints;
Em onplayerspawn eu coloquei
pawn Код:
ptdname = TextDrawCreate(500 ,96 , "Pedro_Mvkxlm");
TextDrawFont(ptdname , 3);
TextDrawLetterSize(ptdname , 0.5, 3.5);
TextDrawColor(ptdname , 0xff0000FF);
TextDrawSetOutline(ptdname , false);
TextDrawSetProportional(ptdname , true);
TextDrawSetShadow(ptdname , 1);


ptdlevel = TextDrawCreate(500 ,101 , "level: 100");
TextDrawFont(ptdlevel , 2);
TextDrawLetterSize(ptdlevel , 0.3, 3.5);
TextDrawColor(ptdlevel , 0xff0000FF);
TextDrawSetOutline(ptdlevel , false);
TextDrawSetProportional(ptdlevel , true);
TextDrawSetShadow(ptdlevel , 1);


ptdpoints = TextDrawCreate(500 ,111 , "points: 1000");
TextDrawFont(ptdpoints , 1);
TextDrawLetterSize(ptdpoints , 0.3, 3.5);
TextDrawColor(ptdpoints , 0xFFFFFFFF);
TextDrawSetOutline(ptdpoints , false);
TextDrawSetProportional(ptdpoints , true);
TextDrawSetShadow(ptdpoints , 1);


ptdwanted = TextDrawCreate(490 ,116 , "points: 1000");
TextDrawFont(ptdwanted , 1);
TextDrawLetterSize(ptdwanted , 0.3, 3.5);
TextDrawColor(ptdwanted , 0xFFFFFFFF);
TextDrawSetOutline(ptdwanted , false);
TextDrawSetProportional(ptdwanted , true);
TextDrawSetShadow(ptdwanted , 1);
Reply
#2

esqueceu de mostra-los para o player...

pawn Код:
public OnPlayerSpawn(playerid)
{
TextDrawHideForPlayer(playerid, ptdwanted[playerid]);
TextDrawHideForPlayer(playerid, ptdpoints[playerid]);
TextDrawHideForPlayer(playerid, ptdlevel[playerid]);
TextDrawHideForPlayer(playerid, ptdname[playerid]);
return 1;
}
Reply
#3

@edit.
post errado --'
Reply
#4

pawn Код:
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(18041) : error 028: invalid subscript (not an array or too many subscripts): "ptdwanted"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(18041) : warning 215: expression has no effect
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(18041) : error 001: expected token: ";", but found "]"
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(18041) : error 029: invalid expression, assumed zero
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA2.pwn(18041) : fatal error 107: too many error messages on one line
Passei isso pra OnGamemodeinit
pawn Код:
ptdname = TextDrawCreate(500 ,96 , "Pedro_Mvkxlm");
TextDrawFont(ptdname , 3);
TextDrawLetterSize(ptdname , 0.5, 3.5);
TextDrawColor(ptdname , 0xff0000FF);
TextDrawSetOutline(ptdname , false);
TextDrawSetProportional(ptdname , true);
TextDrawSetShadow(ptdname , 1);


ptdlevel = TextDrawCreate(500 ,101 , "level: 100");
TextDrawFont(ptdlevel , 2);
TextDrawLetterSize(ptdlevel , 0.3, 3.5);
TextDrawColor(ptdlevel , 0xff0000FF);
TextDrawSetOutline(ptdlevel , false);
TextDrawSetProportional(ptdlevel , true);
TextDrawSetShadow(ptdlevel , 1);


ptdpoints = TextDrawCreate(500 ,111 , "points: 1000");
TextDrawFont(ptdpoints , 1);
TextDrawLetterSize(ptdpoints , 0.3, 3.5);
TextDrawColor(ptdpoints , 0xFFFFFFFF);
TextDrawSetOutline(ptdpoints , false);
TextDrawSetProportional(ptdpoints , true);
TextDrawSetShadow(ptdpoints , 1);


ptdwanted = TextDrawCreate(490 ,116 , "points: 1000");
TextDrawFont(ptdwanted , 1);
TextDrawLetterSize(ptdwanted , 0.3, 3.5);
TextDrawColor(ptdwanted , 0xFFFFFFFF);
TextDrawSetOutline(ptdwanted , false);
TextDrawSetProportional(ptdwanted , true);
TextDrawSetShadow(ptdwanted , 1);
E ai coloquei em onplayerspawn:
pawn Код:
TextDrawShowForPlayer(playerid, ptdwanted[playerid]);
TextDrawShowForPlayer(playerid, ptdpoints[playerid]);
TextDrawShowForPlayer(playerid, ptdlevel[playerid]);
TextDrawShowForPlayer(playerid, ptdname[playerid]);
Mas continua sem funcionar ainda deu os 4 erros do inicio =\
Reply
#5

Vc й o cara que me pediu ajuda?
Enfim use este Exemplo.


@OnTopic: O problema й que vc deve alterar o seu vetor "ptdwanted". Para:
pawn Код:
new ptdwanted[MAX_PLAYERS];


/*Pois esta usando um valor para cada Jogador possivelmente conectado.*/
ptdwanted[playerid]

@edit: Esqueci o link heuheuheu
Reply
#6

D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(18042) : warning 213: tag mismatch
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(18043) : warning 213: tag mismatch
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(18044) : warning 213: tag mismatch
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(18045) : warning 213: tag mismatch
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24916) : error 033: array must be indexed (variable "ptdname")
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24917) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(2491 : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24919) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24920) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24921) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24922) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24925) : error 033: array must be indexed (variable "ptdlevel")
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24926) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24927) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(2492 : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24929) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24930) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24931) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24934) : error 033: array must be indexed (variable "ptdpoints")
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24935) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24936) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24937) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(2493 : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24939) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24940) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24943) : error 033: array must be indexed (variable "ptdwanted")
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24944) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24945) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24946) : error 035: argument type mismatch (argument 1)
D:\Documents and Settings\Administrator\Desktop\RPG\Gamemodes\ULTRA 2.pwn(24947) : error 035: argument type mismatch (argument 1)

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)