Nestaje textdraw za ime

Započeo Luka_Deen, Februar 22, 2019, 14:29:19 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): nema u skripti ni error ni warning
Dio skripte: [ pawn ]vaš odgovor[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/7SvoUJU ovaj dole mali boksic tu treba bit ime i pojavi se na spawnu otvorim stats i zadrzim se na statsu recimo 10sec i nestane
[pawn]/*
     |TEXTDRAW| Server & Igracev nick
          ______________________
                  By:Wang     */
                                     
#define FILTERSCRIPT
//-------Include-----------//
#include <a_samp>
//---------Textdraw-------//
new PlayerText:Igracevnick[MAX_PLAYERS];

//-----------------------------------------------------------------//
public OnPlayerConnect( playerid ) {

   Igracevnick[playerid] = CreatePlayerTextDraw(playerid, 324.216491, 416.499938, "Luka_Deen");
   PlayerTextDrawLetterSize(playerid, Igracevnick[playerid], 0.379253, 1.220832);
   PlayerTextDrawAlignment(playerid, Igracevnick[playerid], 2);
   PlayerTextDrawColor(playerid, Igracevnick[playerid], -1);
   PlayerTextDrawSetShadow(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawBackgroundColor(playerid, Igracevnick[playerid], 51);
   PlayerTextDrawFont(playerid, Igracevnick[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Igracevnick[playerid], 1);
   return 1;
}

public OnPlayerSpawn(playerid)
{
    PlayerTextDrawHide( playerid, Igracevnick[playerid] );
   PlayerTextDrawShow(playerid, Igracevnick[playerid]);
   new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    PlayerTextDrawSetString(playerid, Igracevnick[playerid], name);
   return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
   PlayerTextDrawShow(playerid, Igracevnick[playerid]);
   return 1;
}[/pawn]
Poslednja Izmena: Februar 25, 2019, 17:49:22 POSLE PODNE od Bašovski



Citat: Luka_Deen poslato Februar 22, 2019, 14:39:46 POSLE PODNE
sve sam probao buraz opet isto
Po ovom kodu nema razloga da nestaje tkd ne znam, vidim #define FILTERSCRIPT sto ti ne treba ako je ovo u modu ???

Citat: {Makenzi} poslato Februar 22, 2019, 14:42:42 POSLE PODNE
Po ovom kodu nema razloga da nestaje tkd ne znam, vidim #define FILTERSCRIPT sto ti ne treba ako je ovo u modu ???
sve sam probao pa nece buraz neznam zas nestaje vidis po slici :D

ne znam jesam li te skonto kada kucas /stats nestane nick
a ukoliko ne kucas stats nemas problema sa nestjanjem nicka ?
Ako je tkao posalji stats i je li ti stats slucajno u textdrawu ?

Citat: --Lood-- poslato Februar 22, 2019, 15:07:38 POSLE PODNE
ne znam jesam li te skonto kada kucas /stats nestane nick
a ukoliko ne kucas stats nemas problema sa nestjanjem nicka ?
Ako je tkao posalji stats i je li ti stats slucajno u textdrawu ?
Stats je u textdrawu i sve je ok dokle god ga ne otvaram zadrsim se na njemu recimo 10 sec zatvorim ga komandom /stats i ono nestane nick taj dolje.


Citat: --Lood-- poslato Februar 22, 2019, 15:22:46 POSLE PODNE
buraz koristi logiku
bez stats a radi sa statsom ne nije problem u fs problem je u statsu

daj /stats cmd
[pawn]CMD:stats(playerid, params[], help) {
   if( StatsTDShowed[ playerid ] == false ) {
       for( new chat = 0; chat <= 30; chat++ )
      SCM( playerid, BELA, " " );

        StatsTDControlTEST( playerid, true );

       StatsTDShowed[ playerid ] = true;
       SCM( playerid, SVETLOPLAVA, "* Da ugasite stats opet upisite komandu /stats!");
   }
   else {
       StatsTDShowed[ playerid ] = false;
       StatsTDControlTEST( playerid, false );
   }
   return 1;
}[/pawn]


Citat: --Lood-- poslato Februar 22, 2019, 15:27:10 POSLE PODNE
daj statstdshowed i statstdcontrolTEST
cek jel ti treba cijeli stats ili sta ? sry al ne kontam tocno :D
evo ti ovo pa mi reci sta dalje treba
[pawn]StatsTDShowed[ playerid ] = false;
bool:StatsTDShowed[ MAX_PLAYERS ]
if( StatsTDShowed[ playerid ] == true )
stock StatsTDControlTEST( playerid, bool:show ){
   if( show == true ) { [/pawn] sta ti bas tocno treba posto sam novi ono u ovome pa se trudim radit na modu neke updateove :D

Znam vidim, najbolje ti je vrati u fs i radice sve sto novo ubacujes moras pazit
Textdraw ti zauzima id tipa 1znaci npr
tdid = 1
te ti u cmd /stats
napravis novi textdraw
tdid1 = 1
te komanda hidetextdraw(1)
sakriva oba textdrawa mjesaju ti se idovi
mozes mi poslat taj stock statsTDCOntrolTest
sada idem kada dodjem kuci mocu tyi rjesit problem za tebe ali ti to nije moja preporuka da ti drugi rjesavaju probleme nikad ences naucit ugl ja sam ti reko sta je problem, a kroz nekih 2 sata kada budem kuci mogu ti i rjesit

problem je u mejsanju textdrawa

Nisam testao pokusaj ovo
[pawn]/*
     |TEXTDRAW| Server & Igracev nick
          ______________________
                  By:Wang     */
                                     
#define FILTERSCRIPT
//-------Include-----------//
#include <a_samp>
//---------Textdraw-------//
new PlayerText:Igracevnick[MAX_PLAYERS];

UpdateImeTD( playerid ) {
   new stringic[ 40 ];
   format( stringic, sizeof( stringic ), "%s - %d", PlayerName(playerid),playerid);
   PlayerTextDrawSetString( playerid, Igracevnick[playerid], stringic );
}
//-----------------------------------------------------------------//
public OnPlayerConnect( playerid ) {

   Igracevnick[playerid] = CreatePlayerTextDraw(playerid, 324.216491, 416.499938, "Luka_Deen");
   PlayerTextDrawLetterSize(playerid, Igracevnick[playerid], 0.379253, 1.220832);
   PlayerTextDrawAlignment(playerid, Igracevnick[playerid], 2);
   PlayerTextDrawColor(playerid, Igracevnick[playerid], -1);
   PlayerTextDrawSetShadow(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawBackgroundColor(playerid, Igracevnick[playerid], 51);
   PlayerTextDrawFont(playerid, Igracevnick[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Igracevnick[playerid], 1);
   return 1;
}
public OnPlayerDisconect(playerid)
{
        PlayerTextDrawDestroy(playerid,Igracevnick[playerid] );
   Igracevnick[playerid][1] = PlayerText:INVALID_TEXT_DRAW;
}
public OnPlayerSpawn(playerid)
{
   PlayerTextDrawShow(playerid, Igracevnick[playerid]);
   UpdateImeTD(playerid);
   return 1;
}
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    return name;
}
[/pawn]

Citat: á´ á´‡á´...ʀᴀɴ.ᴀᴍx poslato Februar 22, 2019, 16:38:31 POSLE PODNE
Nisam testao pokusaj ovo
[pawn]/*
     |TEXTDRAW| Server & Igracev nick
          ______________________
                  By:Wang     */
                                     
#define FILTERSCRIPT
//-------Include-----------//
#include <a_samp>
//---------Textdraw-------//
new PlayerText:Igracevnick[MAX_PLAYERS];

UpdateImeTD( playerid ) {
   new stringic[ 40 ];
   format( stringic, sizeof( stringic ), "%s - %d", PlayerName(playerid),playerid);
   PlayerTextDrawSetString( playerid, Igracevnick[playerid], stringic );
}
//-----------------------------------------------------------------//
public OnPlayerConnect( playerid ) {

   Igracevnick[playerid] = CreatePlayerTextDraw(playerid, 324.216491, 416.499938, "Luka_Deen");
   PlayerTextDrawLetterSize(playerid, Igracevnick[playerid], 0.379253, 1.220832);
   PlayerTextDrawAlignment(playerid, Igracevnick[playerid], 2);
   PlayerTextDrawColor(playerid, Igracevnick[playerid], -1);
   PlayerTextDrawSetShadow(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Igracevnick[playerid], 0);
   PlayerTextDrawBackgroundColor(playerid, Igracevnick[playerid], 51);
   PlayerTextDrawFont(playerid, Igracevnick[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Igracevnick[playerid], 1);
   return 1;
}
public OnPlayerDisconect(playerid)
{
        PlayerTextDrawDestroy(playerid,Igracevnick[playerid] );
   Igracevnick[playerid][1] = PlayerText:INVALID_TEXT_DRAW;
}
public OnPlayerSpawn(playerid)
{
   PlayerTextDrawShow(playerid, Igracevnick[playerid]);
   UpdateImeTD(playerid);
   return 1;
}
stock PlayerName(playerid)
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
    return name;
}
[/pawn]
[pawn](31) : warning 235: public function lacks forward declaration (symbol "OnPlayerDisconect")
(34) : warning 215: expression has no effect
(34) : error 001: expected token: ";", but found "["
(34) : error 029: invalid expression, assumed zero
(34) : warning 215: expression has no effect
(34) : error 001: expected token: ";", but found "]"
(34) : fatal error 107: too many error messages on one line[/pawn] public OnPlayerDisconect(playerid) linija 31
Igracevnick[playerid][1] = PlayerText:INVALID_TEXT_DRAW; linija 34 neznam rijesit ovo
Rijesio sam idem test
Poslednja Izmena: Februar 22, 2019, 16:58:56 POSLE PODNE od Luka_Deen

Dodaj kod onplayerdisconnect return 1;