Label nece da se obrise

Započeo noddy_, Januar 07, 2022, 09:21:41 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning): Radim WareHouse sistem, i sada kada se WH kreira meni se napravi label "[WAREHOUSE]\n/buywh"
Zatim kada igrac kuca /buywh i nakon dialoga, igracu se izvrsi kupnja i sve je uredu ali se ne obrise taj label,a naravno drugi se doda "WareHouse :warehouse_name\nIme_Prezime"
Deo skripte: [pawn]DestroyDynamic3DTextLabel(whLabelBought[WareID]);[/pawn]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn]//[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): //
Poslednja Izmena: Januar 08, 2022, 17:05:21 POSLE PODNE od 'xza
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

dak citavu komandu/funkciju kad igrac kupuje WH

Citat: Deleted User poslato Januar 07, 2022, 12:12:21 POSLE PODNE
dak citavu komandu/funkciju kad igrac kupuje WH

[pawn]else if( dialogid == dialog_WAREBUY) {
      if( !response )
      {
         return 1;
      }
      if( response ){
         new warename[34], WareID = GetNearestWarehouse( playerid );
         if( sscanf(inputtext, "s[34]", warename)) return ShowPlayerDialog(playerid, dialog_WAREBUY, DSI, "{DAA520}Ware House - {FFFFFF}Bought", "Unesite ime vaseg Ware House-a", "UNESI", "ODUSTANI");
         if( strlen(inputtext) < 5 ) return SPD(playerid, dialog_WAREBUY, DSI, "{DAA520}Ware House - {FFFFFF}Bought", "{DAA520}Vase ime Ware House-a ne moze biti manje od {FF0000}5!\nUnesite ime vaseg Ware House-a", "UNESI", "ODUSTANI");

         if( !strcmp( wh_info[ WareID ][ wOwner ], "Niko", true ) ) { strmid( wh_info[ WareID ][ wOwner ], ImeIgraca( playerid ), 0, strlen( ImeIgraca( playerid ) ), MAX_OWNER_NAME  ); }
   
         KGEyes_GivePlayerMoney(playerid, -wh_info[WareID][wPrice]);

         strcpy(wh_info[ WareID ][ wName ],  warename);
         strcpy(wh_info[ WareID ][ wOwner ],  ImeIgraca(playerid));
         PlayerInfo[playerid][xWare] = wh_info[WareID][wID];
         wh_info[WareID][wPrice] = 0;
         wh_info[WareID][wBought] = 1;

         if(IsValidDynamic3DTextLabel(whLabelBought[wh_info[WareID][wID]])){

            DestroyDynamic3DTextLabel(whLabelBought[wh_info[WareID][wID]]);
            print("Kad mrdnes kurcom label je validan.");

         }
         DestroyDynamic3DTextLabel(whLabelBought[WareID]);

         new string[128];
         format(string, sizeof(string), "{daa520}WareHouse : {FFFFFF}%s\n{daa520}Owner : {FFFFFF}%s", wh_info[WareID][wName], wh_info[WareID][wOwner]);
         whLabel[WareID] = Create3DTextLabel(string, -1, wh_info[WareID][w_pos_u_X], wh_info[WareID][w_pos_u_Y], wh_info[WareID][w_pos_u_Z], 15.0, 0, 0);   

         sql_user_update_integer( playerid, "ware_have", PlayerInfo[ playerid ][ xWare ] );

         va_SendClientMessage(playerid, -1, "{DAA520}[ WARE BOUGHT ] {FFFFFF}Cestitamo {737BE1}%s {FFFFFF}na uspjesnoj kupovini Ware House-a", ImeIgraca(playerid));

         sql_warehouse_update_string( WareID, "ware_owner", wh_info[WareID][wOwner]);
         sql_warehouse_update_string( WareID, "name", wh_info[WareID][wName]);
         sql_warehouse_update_integer( WareID, "bought", wh_info[WareID][wBought]);
         sql_warehouse_update_integer( WareID, "wprice",  wh_info[WareID][wPrice]);
      }
   }[/pawn]
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Brises ga kao Dynamic a nisi ga kreiro kao Dynamic nece da moze

Create3DTextLabel

CreateDynamic3DTextLabel

Citat: _tayloR poslato Januar 07, 2022, 13:11:56 POSLE PODNE
Brises ga kao Dynamic a nisi ga kreiro kao Dynamic nece da moze

Create3DTextLabel

CreateDynamic3DTextLabel

[pawn]whLabelBought[whID] = CreateDynamic3DTextLabel( string, -1, wh_info[whID][w_pos_u_X], wh_info[whID][w_pos_u_Y], wh_info[whID][w_pos_u_Z], 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1, 20.0);
            [/pawn]

evo kako je kreiran u OnWareHouseLoad
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Citat: ɴᴏᴅɪ poslato Januar 07, 2022, 13:17:07 POSLE PODNE
[pawn]whLabelBought[whID] = CreateDynamic3DTextLabel( string, -1, wh_info[whID][w_pos_u_X], wh_info[whID][w_pos_u_Y], wh_info[whID][w_pos_u_Z], 5.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, 0, 0, -1, 20.0);
            [/pawn]

evo kako je kreiran u OnWareHouseLoad

Za sta ti je

whLabelBought

I za sta je

whLabel

Citat: _tayloR poslato Januar 07, 2022, 14:00:52 POSLE PODNE
Za sta ti je

whLabelBought

I za sta je

whLabel


whLabelBought je ako nije kupit WH ono /buywh

whLabel je obicni label ako je u vlasnistvu : WareHouse : Ime_WH\nVlasnik: Ime_ Vlasnika
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama

Citat: ɴᴏᴅɪ poslato Januar 07, 2022, 16:16:58 POSLE PODNE

whLabelBought je ako nije kupit WH ono /buywh

whLabel je obicni label ako je u vlasnistvu : WareHouse : Ime_WH\nVlasnik: Ime_ Vlasnika
Zasto ce ti 2 varijable za to kad mozes jednu i mozes ga
UpdateDynamic3DTextLabelText
kad se kupi ili kad se proda

Citat: _tayloR poslato Januar 07, 2022, 16:53:22 POSLE PODNE
Zasto ce ti 2 varijable za to kad mozes jednu i mozes ga
UpdateDynamic3DTextLabelText
kad se kupi ili kad se proda
Fixano hvala
SPEED HACK (C++) https://github.com/nouddy/samp-speed-hack
Reliant GameMode (open.mp) https://github.com/nouddy/reliant-omp
SA:MP Landing Page https://github.com/nouddy/samp-landing-page


Kolko drama ima u 7 grama