[Ajuda] textdraw = rep+
#1

man olha essas textdraw so mostra pra 1 player n para todos :S
e tipo eu tentei tirar o PlayerTextDraw e por apenas TextDraw em todos mais deu mais de 24 warnings e 11 erros , n consigo colocar o codigo dos erros aqui porque tem mais de 11 mil caracters
poderia me ajudar ?
PHP код:
new PlayerText:HUD7[MAX_PLAYERS];
new 
PlayerText:HUD8[MAX_PLAYERS];
new 
PlayerText:HUD9[MAX_PLAYERS]; 
PHP код:
    //========================================
    // Criar PlayerTextDraw
    
HUD7[playerid] = CreatePlayerTextDraw(playerid511.48590061.176670"_");
    
PlayerTextDrawLetterSize(playeridHUD7[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD7[playerid], 1);
    
PlayerTextDrawColor(playeridHUD7[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD7[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD7[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD7[playerid], 255);
    
PlayerTextDrawFont(playeridHUD7[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD7[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD7[playerid], 0);
    
HUD8[playerid] = CreatePlayerTextDraw(playerid527.85302773.310012"_");
    
PlayerTextDrawLetterSize(playeridHUD8[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD8[playerid], 1);
    
PlayerTextDrawColor(playeridHUD8[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD8[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD8[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD8[playerid], 255);
    
PlayerTextDrawFont(playeridHUD8[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD8[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD8[playerid], 0);
    
HUD9[playerid] = CreatePlayerTextDraw(playerid508.12643485.256683"_");
    
PlayerTextDrawLetterSize(playeridHUD9[playerid], 0.2351991.144533);
    
PlayerTextDrawAlignment(playeridHUD9[playerid], 1);
    
PlayerTextDrawColor(playeridHUD9[playerid], -1);
    
PlayerTextDrawSetShadow(playeridHUD9[playerid], 0);
    
PlayerTextDrawSetOutline(playeridHUD9[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridHUD9[playerid], 255);
    
PlayerTextDrawFont(playeridHUD9[playerid], 2);
    
PlayerTextDrawSetProportional(playeridHUD9[playerid], 1);
    
PlayerTextDrawSetShadow(playeridHUD9[playerid], 0);
    
//======================================== 
onplayerdeath
PHP код:
    PlayerTextDrawHide(playeridHUD7[playerid]); // esconder os HUDS quando morrer
    
PlayerTextDrawHide(playeridHUD8[playerid]); // esconder os HUDS quando morrer
    
PlayerTextDrawHide(playeridHUD9[playerid]); // esconder os HUDS quando morrer
    
KillTimer(Status(playerid)); // Parar de chamar a public "Status"
    
Tempo[playerid] = 0// setar o tempo para 0 novamente 
PHP код:
forward Status(playerid);
public 
Status(playerid)
{
    new 
String[128], Float:Health;
    
GetPlayerHealth(playeridHealth);
    
//
/*
    format(String, sizeof(String), "alive_time: ~w~%d", Tempo[playerid]);
    PlayerTextDrawSetString(playerid, HUD7[playerid], String);
*/
    
format(Stringsizeof(String), "alive_time: ~w~%d:%d.",Tempo[playerid]);
    
PlayerTextDrawSetString(playeridHUD7[playerid], String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridHUD8[playerid], String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridHUD9[playerid], String);
    
//
    
Tempo[playerid]++;
    return 
1;

Reply
#2

isso nгo й um status? Entгo quando usa /status irб mostrar so para o player..
Reply
#3

No seu cуdigo vocк nгo mostra as TextDraws
Reply
#4

Quote:
Originally Posted by GustavoSouza
Посмотреть сообщение
isso nгo й um status? Entгo quando usa /status irб mostrar so para o player..
quando o player da connect no sv mostra e um hud amigo , tipo o nгo mostra para o ultimo player as textdraws
Reply
#5

Ponha para mostrar em OnPlayerSpawn, jб que quando ele 'morre' elas sгo ocultadas.
Reply
#6

Quote:
Originally Posted by NicK_
Посмотреть сообщение
Ponha para mostrar em OnPlayerSpawn, jб que quando ele 'morre' elas sгo ocultadas.
eu consegui arrumar alн era os [playerid]

agora deu esses no final

PHP код:
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 028invalid subscript (not an array or too many subscripts): "HUD7"
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : warning 215expression has no effect
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 001expected token";"but found "]"
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 029invalid expressionassumed zero
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

PHP код:

    format
(Stringsizeof(String), "alive_time: ~w~%d:%d.",Tempo[playerid]);
    
PlayerTextDrawSetString(playeridHUD7[playerid], String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridHUD8[playerid], String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridHUD9[playerid], String); 
Reply
#7

Quote:
Originally Posted by zPawnu
Посмотреть сообщение
eu consegui arrumar alн era os [playerid]

agora deu esses no final

PHP код:
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 028invalid subscript (not an array or too many subscripts): "HUD7"
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : warning 215expression has no effect
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 001expected token";"but found "]"
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : error 029invalid expressionassumed zero
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

PHP код:

    format
(Stringsizeof(String), "alive_time: ~w~%d:%d.",Tempo[playerid]);
    
PlayerTextDrawSetString(playeridHUD7[playerid], String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridHUD8[playerid], String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridHUD9[playerid], String); 
Quando eu disse 'mostrar', era pra vocк por para mostra-las para o jogador (PlayerTextDrawShow). Exemplo
PHP код:
public OnPlayerSpawn(playerid) {
    
PlayerTextDrawShow(playerid,HUD7[playerid]);
    
PlayerTextDrawShow(playerid,HUD8[playerid]);
    
PlayerTextDrawShow(playerid,HUD9[playerid]);
    return 
1;

Outra observaзгo...
PHP код:
    KillTimer(Status(playerid)); // Parar de chamar a public "Status" 
Isto istб totalmente errado. Vocк deverб criar uma var, pois quando utilizas SetTimerEx/SetTimer й retornado um ID, que serб utilizado para matar caso queira. Exemplo

PHP код:
new StatusHUD[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid) {
    
StatusHUD[playerid] = SetTimerEx("Status"1000true"d"playerid);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason) {
    
KillTimer(StatusHUD[playerid]);
    return 
1;

Espero ter ajudado.
Reply
#8

Quote:
Originally Posted by NicK_
Посмотреть сообщение
Quando eu disse 'mostrar', era pra vocк por para mostra-las para o jogador (PlayerTextDrawShow). Exemplo
PHP код:
public OnPlayerSpawn(playerid) {
    
PlayerTextDrawShow(playerid,HUD7[playerid]);
    
PlayerTextDrawShow(playerid,HUD8[playerid]);
    
PlayerTextDrawShow(playerid,HUD9[playerid]);
    return 
1;

Outra observaзгo...
PHP код:
    KillTimer(Status(playerid)); // Parar de chamar a public "Status" 
Isto istб totalmente errado. Vocк deverб criar uma var, pois quando utilizas SetTimerEx/SetTimer й retornado um ID, que serб utilizado para matar caso queira. Exemplo

PHP код:
new StatusHUD[MAX_PLAYERS];
public 
OnPlayerSpawn(playerid) {
    
StatusHUD[playerid] = SetTimerEx("Status"1000true"d"playerid);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason) {
    
KillTimer(StatusHUD[playerid]);
    return 
1;

Espero ter ajudado.
PHP код:
    format(Stringsizeof(String), "alive_time: ~w~%d: Seconds."Tempo[playerid]);
    
PlayerTextDrawSetString(playeridText:HUD7,  String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridText:HUD8String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridText:HUD9String); 
PHP код:
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : warning 213tag mismatch
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1317) : warning 213tag mismatch
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1320) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Warnings

Reply
#9

Quote:
Originally Posted by zPawnu
Посмотреть сообщение
PHP код:
    format(Stringsizeof(String), "alive_time: ~w~%d: Seconds."Tempo[playerid]);
    
PlayerTextDrawSetString(playeridText:HUD7,  String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridText:HUD8String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridText:HUD9String); 
PHP код:
C:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1314) : warning 213tag mismatch
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1317) : warning 213tag mismatch
C
:\Users\Jefferson\Desktop\157\gamemodes\Projectz.pwn(1320) : warning 213tag mismatch
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Warnings

PHP код:
new PlayerText:HUD7[MAX_PLAYERS];
new 
PlayerText:HUD8[MAX_PLAYERS];
new 
PlayerText:HUD9[MAX_PLAYERS]; 
Se й PlayerText...
PHP код:
    format(Stringsizeof(String), "alive_time: ~w~%d: Seconds."Tempo[playerid]);
    
PlayerTextDrawSetString(playeridHUD7[playerid],  String);
    
//
    
format(Stringsizeof(String), "blood: ~w~%0.0f",Health);
    
PlayerTextDrawSetString(playeridHUD8[playerid], String);
    
//
    
format(Stringsizeof(String), "name:_~w~%s",Nome(playerid));
    
PlayerTextDrawSetString(playeridHUD9[playerid], String); 
Reply
#10

Cade meu +Rep? HSUAHSUAHSUA
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)