Stan Label

Započeo Stalenzi ツ, Decembar 15, 2017, 14:19:04 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Skripta koju koristim:UP
Detaljan opis Problema:Na igracu id 0 se stvori label stana
Slika/Video: https://imgur.com/a/XKcGn
Pawno Kod: po potrebi

Posalji kod koji kreira label za stan, verovatno ce ti ostali pomoci.
Oduvek sam se pitao:
"Zbog cega se ljudi toliko brinu jedni za druge?",
"Zasto ljudi daju sve od sebe da usrece neku osobu?"

Najjednostavnije receno brinu se jer vole tu osobu celim svojim srcem,
daju sve od sebe da je usrece zbog toga sto ne zele da je ikada vide tuznom ili rasplakanom.
#xsarnaaparatima..

Pogledaj kod komande kreiranje stana mozda si pogresio pa zato se kreira samo
#ROBY
#ONLINE !
----- NIKAD PORAZ SAMO LEKCIJA! -----

CMD
[pawn]YCMD:kreirajstan(playerid, params[],help)
{
   #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"***"BELA"Luda Kuca:"CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""SPLAVA"***"BELA"Luda Kuca:"SIVA"Samo Vlasnik!");
   if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""PLAVA"(("BELA"Luda Kuca"PLAVA"))"SIVA"Morate biti na admin duznosti!");
   new idstan,level,cena,sstan[80],string[500]; GetPlayerPos(playerid,X,Y,Z);
   if(sscanf(params, "iii",idstan,level,cena)) return SCM(playerid,-1,""PLAVA"(("BELA"Luda Kuca"PLAVA"))  Pomoc | "SIVA"/kreirajstan [ID] [Level] [Cena]");
    if(idstan >= MAX_STANOVA) return SCM(playerid,-1, ""PLAVA"(("BELA"Luda Kuca"PLAVA"))"SIVA"Maximum stanova je ogranicen ne mozes koristiti taj ID!");
   format(sstan, sizeof(sstan), STAN_FILE, idstan);
   if(fexist(sstan)) return SCM(playerid,-1, "***"BELA"Luda Kuca:"SPLAVA"ID tog stana vec postoji!");
   StanInfo[idstan][sIzlazX] = 244.1522; StanInfo[idstan][sIzlazY] = 305.0730; StanInfo[idstan][sIzlazZ] = 999.1484; StanInfo[idstan][sInt] = 1;
   StanInfo[idstan][sCena] = cena; StanInfo[idstan][sLevel] = level; StanInfo[idstan][sUlazX] = X;
    StanInfo[idstan][sUlazY] = Y; StanInfo[idstan][sUlazZ] = Z; StanInfo[idstan][sProveraVlasnika] = 0;
    StanInfo[idstan][sNovac] = 0; StanInfo[idstan][sZatvoreno] = 1; StanInfo[idstan][sVW] = idstan;
    StanInfo[idstan][sOruzije] = -1; StanInfo[idstan][sMunicija] = 0;
    strmid(StanInfo[idstan][sVlasnik],"Niko",0,strlen("Niko"),255);
   format(string,sizeof(string),""ZUTA"[ STAN NA PRODAJU ]!\nCena:"BELA"%d$\n"ZUTA"Level: "BELA"%d\n"ZUTA"Za kupovinu /kupistan",StanInfo[idstan][sCena], StanInfo[idstan][sLevel]);
   StanLabel[idstan] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ],25,0,1);
   StanPickup[idstan] = CreateDynamicPickup(19134, 1, StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ]);
   SCMF(playerid,-1,""PLAVA"(("BELA"Luda Kuca"PLAVA"))"SIVA"Stan je uspesno kreiran (ID Stana: %d)!",idstan);
   SacuvajStan(idstan);
   return 1;
}[/pawn]
labeli
[pawn]   for(new s = 0; s < sizeof(StanInfo); s++)
   {
      new sFile[80],string[300];
      format(sFile, sizeof(sFile), STAN_FILE, s);
      if(fexist(sFile))
      {
         INI_ParseFile(sFile, "UcitajStanove", .bExtra = true, .extra = s);
         if(StanInfo[sProveraVlasnika] == 0)
         {
            format(string,sizeof(string),""ZUTA"[ STAN NA PRODAJU ]\nBroj Stana:"BELA"%d\n"ZUTA"Cena:"BELA"%d$\n"ZUTA"Level: "BELA"%d\n"ZUTA"Za kupovinu /kupistan",s,StanInfo[sCena], StanInfo[sLevel]);
            StanLabel = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ],30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 7.0);
            StanPickup = CreateDynamicPickup(19134, 1, StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ]);
         }
         else if(StanInfo[sProveraVlasnika] == 1)
         {
            format(string,sizeof(string),""ZUTA"Vlasnik stana:"BELA"%s\n"ZUTA"Broj Stana:"BELA"%d\n"ZUTA"Cena:"BELA"%d$\n"ZUTA"Level: "BELA"%d",StanInfo[sVlasnik],s,StanInfo[sCena],StanInfo[sLevel]);
            StanLabel = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ],30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 7.0);
            StanPickup = CreateDynamicPickup(1239, 1, StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ]);
         }
      }
   }[/pawn]

Pri ucitavanju ili kad ga napravis?

kad udje igrac sa id 0 na server pojavi se label na njega

Citat: Stalenzi ãƒ,, poslato Decembar 15, 2017, 19:10:41 POSLE PODNE
kad udje igrac sa id 0 na server pojavi se label na njega
Da nemaš možda previše Create3DTextLabel, proveri i prebaci u dynamic..


Probaj ovako :)
[pawn] YCMD:kreirajstan(playerid, params[],help)
{
   #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"GT:RP ~ "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""SPLAVA"GT:RP "BELA"Samo Vlasnik!");
   if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""SPLAVA"GT:RP "BELA"Morate biti na admin duznosti!");
   new idstan,level,cena,sstan[80],string[500]; GetPlayerPos(playerid,X,Y,Z);
   if(sscanf(params, "iii",idstan,level,cena)) return SCM(playerid,-1,""SPLAVA"GT:RP ~ "BELA"/kreirajstan [ID] [Level] [Cena]");
    if(idstan >= MAX_STANOVA) return SCM(playerid,-1, ""SPLAVA"GT:RP ~ "BELA"Maximum stanova je ogranicen ne mozes koristiti taj ID!");
   format(sstan, sizeof(sstan), STAN_FILE, idstan);
   if(fexist(sstan)) return SCM(playerid,-1, "GT:RP ~ "BELA"ID tog stana vec postoji!");
   StanInfo[idstan][sIzlazX] = 244.1522; StanInfo[idstan][sIzlazY] = 305.0730; StanInfo[idstan][sIzlazZ] = 999.1484; StanInfo[idstan][sInt] = 1;
   StanInfo[idstan][sCena] = cena; StanInfo[idstan][sLevel] = level; StanInfo[idstan][sUlazX] = X;
    StanInfo[idstan][sUlazY] = Y; StanInfo[idstan][sUlazZ] = Z; StanInfo[idstan][sProveraVlasnika] = 0;
    StanInfo[idstan][sNovac] = 0; StanInfo[idstan][sZatvoreno] = 1; StanInfo[idstan][sVW] = idstan;
    StanInfo[idstan][sOruzije] = -1; StanInfo[idstan][sMunicija] = 0;
    strmid(StanInfo[idstan][sVlasnik],"Niko",0,strlen("Niko"),255);
   format(string,sizeof(string),""SPLAVA"[ STAN NA PRODAJU ]!\nCena: "BELA"%d$\n"BELA"Level: "BELA"%d\n"BELA"Za kupovinu /kupistan",StanInfo[idstan][sCena], StanInfo[idstan][sLevel]);
   StanLabel[idstan] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ],25,0,1);
   StanPickup[idstan] = CreateDynamicPickup(19134, 1, StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ]);
   va_SendClientMessage(playerid,-1,""SPLAVA"GT:RP "BELA"Stan je uspesno kreiran (ID Stana: %d)!",idstan);
   SacuvajStan(idstan);
   return 1;
}
////////////////////////SAD STANOVI UCITAVANJE///////////////////////////////////////
   for(new s = 0; s < sizeof(StanInfo); s++)
   {
      new sFile[80],string[300];
      format(sFile, sizeof(sFile), STAN_FILE, s);
      if(fexist(sFile))
      {
         INI_ParseFile(sFile, "UcitajStanove", .bExtra = true, .extra = s);
         if(StanInfo[sProveraVlasnika] == 0)
         {
            format(string,sizeof(string),""SPLAVA"[ STAN NA PRODAJU ]\nBroj Stana: "BELA"%d\n"SPLAVA"Cena: "BELA"%d$\n"SPLAVA"Level: "BELA"%d\n"SPLAVA"Za kupovinu /kupistan",s,StanInfo[sCena], StanInfo[sLevel]);
            StanLabel = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ],30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 7.0);
            StanPickup = CreateDynamicPickup(19524, 1, StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ]);
         }
         else if(StanInfo[sProveraVlasnika] == 1)
         {
            format(string,sizeof(string),""SPLAVA"Vlasnik stana: "BELA"%s\n"SPLAVA"Broj Stana: "BELA"%d\n"SPLAVA"Cena: "BELA"%d$\n"SPLAVA"Level: "BELA"%d",StanInfo[sVlasnik],s,StanInfo[sCena],StanInfo[sLevel]);
            StanLabel = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ],30.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 7.0);
            StanPickup = CreateDynamicPickup(19607, 1, StanInfo[sUlazX], StanInfo[sUlazY], StanInfo[sUlazZ]);
         }
      }
   }
[/pawn]

Gamemod: Spotify Community
Owner: Nodze ( Dzenan Levic )

Hvala nozde,javiću rezultate

[pawn]CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_3D_TEXT_LABEL_SD, STREAMER_TAG_AREA areaid = [/pawn]
ovo ti mora biti na -1, provjeri parametre
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci



Prošlo 48h bez ikakvog odgovora na temu.
heroin rap - Moskri u kuci, od sledece lajne glava ce mi puci