AdminDuty TEXTDRAW!

Započeo pajdomen, Novembar 13, 2017, 22:31:24 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

OVO JE TUT ZA POCETNIKE,TREBALO MI JE MANJE OD 2 MINUTA DA SVE UBACIM I DA TESTAM


Pozdrav svima!Ovo je moj prvi TuT koji sam ja napravio sam!Ovo je nesto najprostije sto se moze napraviti pa da pocnemo!
Sta je u pitanju?U pitanju je jedan TuT kada Admin pali duznost pojavljuje mu se TextDraw da je na duznosti!

Pa da pocnemo!


Ako slika ne radi javite!

Ovo je kada je Admin na duznosti pojavljuje se TextDraw: https://imgur.com/a/LSksS
Ovo je kada Admin skida duznost(textdraw se uklanja): https://imgur.com/a/zyEkC

Pre svega moramo definisati taj TextDraw u nasoj skripti.Naravno definirajte to kod ostalih textdraova ili na vrhu skripte!

[pawn]new Text:Aduty; [/pawn]
Kad smo to zavrsili potrebno je da ubacimo nas textdraw.TextDraw ubacujete u OnGameModeInit i to ide ovako!

[pawn]Aduty = TextDrawCreate(44.000011, 325.546630, "Aduty");
   TextDrawLetterSize(Aduty, 0.449999, 1.600000);
   TextDrawAlignment(Aduty, 1);
   TextDrawColor(Aduty, -16776961);
   TextDrawUseBox(Aduty, true);
   TextDrawBoxColor(Aduty, 0);
   TextDrawSetShadow(Aduty, 0);
   TextDrawSetOutline(Aduty, 1);
   TextDrawBackgroundColor(Aduty, 51);
   TextDrawFont(Aduty, 1);
   TextDrawSetProportional(Aduty, 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!

Ova komanda je uzete sa UP moda posto sam tu sve testirao!

[pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
   }
   return 1;
}[/pawn]
Kako sada to ubaciti?Veoma je jednostavno,ispod g_setplayerhealth,gde pise da je Admin na duznosti,otvorite novo polje i upisite 

[pawn]TextDrawShowForPlayer(playerid, Aduty);[/pawn]
Kada ste to zavrsili morate da ubacite da kada skinete duznost  da se  TextDraw sakrije. 

Ispod Administator vise nije na duznosti imate zadnju linije AdminDuty,opet otvorite novo polje i kucate

[pawn]TextDrawHideForPlayer(playerid, Aduty);[/pawn]

Kada to odradite sve to sto sam vam objasnio treba da izgleda ovako

[pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      TextDrawShowForPlayer(playerid, Aduty);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      TextDrawHideForPlayer(playerid, Aduty);
   }
   return 1;
}[/pawn]


Takodje ovo Aduty nije lepo centrirano iznad mape pa mozete vi da promenite da pise AdminDuty.
Nadam se da sam pomogao inace nemojte da sudite,ovo je veoma lak tutorial ali moze pomoci igracima :)
Takodje je za veoma malo vremena napravljen!
Poslednja Izmena: Novembar 13, 2017, 22:34:20 POSLE PODNE od Linsco

moze se ovo bolje objasniti,pohvale za trud

Citat: Linsco poslato Novembar 13, 2017, 22:31:24 POSLE PODNE
OVO JE TUT ZA POCETNIKE,TREBALO MI JE MANJE OD 2 MINUTA DA SVE UBACIM I DA TESTAM


Pozdrav svima!Ovo je moj prvi TuT koji sam ja napravio sam!Ovo je nesto najprostije sto se moze napraviti pa da pocnemo!
Sta je u pitanju?U pitanju je jedan TuT kada Admin pali duznost pojavljuje mu se TextDraw da je na duznosti!

Pa da pocnemo!


Ako slika ne radi javite!

Ovo je kada je Admin na duznosti pojavljuje se TextDraw: https://imgur.com/a/LSksS
Ovo je kada Admin skida duznost(textdraw se uklanja): https://imgur.com/a/zyEkC

Pre svega moramo definisati taj TextDraw u nasoj skripti.Naravno definirajte to kod ostalih textdraova ili na vrhu skripte!

[pawn]new Text:Aduty; [/pawn]
Kad smo to zavrsili potrebno je da ubacimo nas textdraw.TextDraw ubacujete u OnGameModeInit i to ide ovako!

[pawn]Aduty = TextDrawCreate(44.000011, 325.546630, "Aduty");
   TextDrawLetterSize(Aduty, 0.449999, 1.600000);
   TextDrawAlignment(Aduty, 1);
   TextDrawColor(Aduty, -16776961);
   TextDrawUseBox(Aduty, true);
   TextDrawBoxColor(Aduty, 0);
   TextDrawSetShadow(Aduty, 0);
   TextDrawSetOutline(Aduty, 1);
   TextDrawBackgroundColor(Aduty, 51);
   TextDrawFont(Aduty, 1);
   TextDrawSetProportional(Aduty, 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!

Ova komanda je uzete sa UP moda posto sam tu sve testirao!

[pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
   }
   return 1;
}[/pawn]
Kako sada to ubaciti?Veoma je jednostavno,ispod g_setplayerhealth,gde pise da je Admin na duznosti,otvorite novo polje i upisite 

[pawn]TextDrawShowForPlayer(playerid, Aduty);[/pawn]
Kada ste to zavrsili morate da ubacite da kada skinete duznost  da se  TextDraw sakrije. 

Ispod Administator vise nije na duznosti imate zadnju liniju AdminDuty,opet otvorite novo polje i kucate

[pawn]TextDrawHideForPlayer(playerid, Aduty);[/pawn]

Kada to odradite sve to sto sam vam objasnio treba da izgleda ovako

[pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      TextDrawShowForPlayer(playerid, Aduty);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      TextDrawHideForPlayer(playerid, Aduty);
   }
   return 1;
}[/pawn]


Takodje ovo Aduty nije lepo centrirano iznad mape pa mozete vi da promenite da pise AdminDuty.
Nadam se da sam pomogao inace nemojte da sudite,ovo je veoma lak tutorial ali moze pomoci igracima :)
Takodje je za veoma malo vremena napravljen!

Citat: Stifler ãƒ,, poslato Novembar 13, 2017, 22:34:36 POSLE PODNE
moze se ovo bolje objasniti,pohvale za trud

Hvala i izvinite valjda sam nenamerno uneo citat ;D
Samo sam objasnio osnovno ali eto mozda nekom pomogne pa da uradi ovo je veoma brzo odradjeno :)

Pohvale,Moze se bolje objasniti ,a i pozeljno je koristiti u Player TDu ovo moze da pali svima ,a i ne mora. Napisacu dole kako koristiti  ;D ;D [pawn]new PlayerText:Aduty[playerid];[/pawn] ovo ubacimo u neki newovi ili kako vec, sledeci kod ide pod KreirajTextDrawe(playerid)
[pawn]Aduty[playerid] = TextDrawCreatePlayer(playerid, 44.000011, 325.546630, "Aduty[playerid]");
   PlayerTextDrawLetterSize(playerid, Aduty[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Aduty[playerid], 1);
   PlayerTextDrawColor(playerid, Aduty[playerid], -16776961);
   PlayerTextDrawUseBox(playerid, Aduty[playerid], true);
   PlayerTextDrawBoxColor(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetShadow(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Aduty[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Aduty[playerid], 51);
   PlayerTextDrawFont(playerid, Aduty[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Aduty[playerid], 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!
Jos Samo komandu [pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      PlayerTextDrawShow(playerid, Aduty[playerid]);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      PlayerTextDrawHide(playerid, Aduty[playerid]);
   }
   return 1;
}[/pawn] Ovako je pozeljno jer moguce da se po tvom kodu svima pokazavati
;D ;D
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Citat: Skorpija poslato Novembar 13, 2017, 23:04:22 POSLE PODNE
Pohvale,Moze se bolje objasniti ,a i pozeljno je koristiti u Player TDu ovo moze da pali svima ,a i ne mora. Napisacu dole kako koristiti  ;D ;D [pawn]new PlayerText:Aduty[playerid];[/pawn] ovo ubacimo u neki newovi ili kako vec, sledeci kod ide pod KreirajTextDrawe(playerid)
[pawn]Aduty[playerid] = TextDrawCreatePlayer(playerid, 44.000011, 325.546630, "Aduty[playerid]");
   PlayerTextDrawLetterSize(playerid, Aduty[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Aduty[playerid], 1);
   PlayerTextDrawColor(playerid, Aduty[playerid], -16776961);
   PlayerTextDrawUseBox(playerid, Aduty[playerid], true);
   PlayerTextDrawBoxColor(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetShadow(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Aduty[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Aduty[playerid], 51);
   PlayerTextDrawFont(playerid, Aduty[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Aduty[playerid], 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!
Jos Samo komandu [pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      PlayerTextDrawShow(playerid, Aduty[playerid]);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      PlayerTextDrawHide(playerid, Aduty[playerid]);
   }
   return 1;
}[/pawn] Ovako je pozeljno jer moguce da se po tvom kodu svima pokazavati
;D ;D

Moze i tako,ja sam to na brzinu objavio samo da ima a posle ko hoce da nadogradi moze ;D



Citat: Skorpija poslato Novembar 13, 2017, 23:04:22 POSLE PODNE
Pohvale,Moze se bolje objasniti ,a i pozeljno je koristiti u Player TDu ovo moze da pali svima ,a i ne mora. Napisacu dole kako koristiti  ;D ;D [pawn]new PlayerText:Aduty[playerid];[/pawn] ovo ubacimo u neki newovi ili kako vec, sledeci kod ide pod KreirajTextDrawe(playerid)
[pawn]Aduty[playerid] = TextDrawCreatePlayer(playerid, 44.000011, 325.546630, "Aduty[playerid]");
   PlayerTextDrawLetterSize(playerid, Aduty[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Aduty[playerid], 1);
   PlayerTextDrawColor(playerid, Aduty[playerid], -16776961);
   PlayerTextDrawUseBox(playerid, Aduty[playerid], true);
   PlayerTextDrawBoxColor(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetShadow(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Aduty[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Aduty[playerid], 51);
   PlayerTextDrawFont(playerid, Aduty[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Aduty[playerid], 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!
Jos Samo komandu [pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      PlayerTextDrawShow(playerid, Aduty[playerid]);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      PlayerTextDrawHide(playerid, Aduty[playerid]);
   }
   return 1;
}[/pawn] Ovako je pozeljno jer moguce da se po tvom kodu svima pokazavati
;D ;D
Ne mora player, player TD se koristi samo za one koji se updateuju posebno za svakog igrača(string i slično), a ovaj se samo prikazuje tkd može i global, a da bi se pokazao svima potreban je foreach ili loop pa GetPlayerPoolSize

Citat: Skorpija poslato Novembar 13, 2017, 23:04:22 POSLE PODNE
Pohvale,Moze se bolje objasniti ,a i pozeljno je koristiti u Player TDu ovo moze da pali svima ,a i ne mora. Napisacu dole kako koristiti  ;D ;D [pawn]new PlayerText:Aduty[playerid];[/pawn] ovo ubacimo u neki newovi ili kako vec, sledeci kod ide pod KreirajTextDrawe(playerid)
[pawn]Aduty[playerid] = TextDrawCreatePlayer(playerid, 44.000011, 325.546630, "Aduty[playerid]");
   PlayerTextDrawLetterSize(playerid, Aduty[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Aduty[playerid], 1);
   PlayerTextDrawColor(playerid, Aduty[playerid], -16776961);
   PlayerTextDrawUseBox(playerid, Aduty[playerid], true);
   PlayerTextDrawBoxColor(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetShadow(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Aduty[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Aduty[playerid], 51);
   PlayerTextDrawFont(playerid, Aduty[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Aduty[playerid], 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!
Jos Samo komandu [pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      PlayerTextDrawShow(playerid, Aduty[playerid]);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      PlayerTextDrawHide(playerid, Aduty[playerid]);
   }
   return 1;
}[/pawn] Ovako je pozeljno jer moguce da se po tvom kodu svima pokazavati
;D ;D
lol @Muma420 vidi ovo

Citat: Skorpija poslato Novembar 13, 2017, 23:04:22 POSLE PODNE
Pohvale,Moze se bolje objasniti ,a i pozeljno je koristiti u Player TDu ovo moze da pali svima ,a i ne mora. Napisacu dole kako koristiti  ;D ;D [pawn]new PlayerText:Aduty[playerid];[/pawn] ovo ubacimo u neki newovi ili kako vec, sledeci kod ide pod KreirajTextDrawe(playerid)
[pawn]Aduty[playerid] = TextDrawCreatePlayer(playerid, 44.000011, 325.546630, "Aduty[playerid]");
   PlayerTextDrawLetterSize(playerid, Aduty[playerid], 0.449999, 1.600000);
   PlayerTextDrawAlignment(playerid, Aduty[playerid], 1);
   PlayerTextDrawColor(playerid, Aduty[playerid], -16776961);
   PlayerTextDrawUseBox(playerid, Aduty[playerid], true);
   PlayerTextDrawBoxColor(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetShadow(playerid, Aduty[playerid], 0);
   PlayerTextDrawSetOutline(playerid, Aduty[playerid], 1);
   PlayerTextDrawBackgroundColor(playerid, Aduty[playerid], 51);
   PlayerTextDrawFont(playerid, Aduty[playerid], 1);
   PlayerTextDrawSetProportional(playerid, Aduty[playerid], 1);[/pawn]
Kada ste to uradili potrebno je da pronadjemo AdminDuty komandu kako bi namestili TextDraw!
Jos Samo komandu [pawn]YCMD:adminduty(playerid, params[], help)
{
    #pragma unused help
   #pragma unused params
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,"LProject | "CRVENA"Moras se ulogovati da bi koristio ovu komandu!");
   if(PlayerInfo[playerid][pAdmin] == 0) return SCM(playerid, -1, ""SPLAVA"[LProject] "BELA"Niste ovlasceni!!");
   new string[256];
   if(AdminDuty[playerid] == 0)
   {
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"je na duznosti,za pomoc kucajte "ZUTA"/pitaj "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 1;
      SetPlayerColor(playerid, AZUTA);
      SetPlayerArmour(playerid, 99.0);
      g_SetPlayerHealth(playerid, 99.0);
      PlayerTextDrawShow(playerid, Aduty[playerid]);
   }
   else if(AdminDuty[playerid] == 1)
   {
      SetPlayerArmour(playerid, 0);
      g_SetPlayerHealth(playerid, 99.0);
      SetPlayerColor(playerid,BELA2);
      format(string,sizeof(string),""SPLAVA"(( "BELA"Administrator "CRVENA"%s "BELA"vise nije na duznosti "SPLAVA"))",GetName(playerid));
      SCMTA(-1,string);
      AdminDuty[playerid] = 0;
      PlayerTextDrawHide(playerid, Aduty[playerid]);
   }
   return 1;
}[/pawn] Ovako je pozeljno jer moguce da se po tvom kodu svima pokazavati
;D ;D
Bruda, vidis TextDrawShowForPlayer(playerid, Aduty);
Vljd vidis ForPlayer i playerid :)
@tema, ne znam kome ovo treba hah :) A inace ok je :P

Facebook - Klik



Ovo je bas za pocetnike ,mogao si malo slozenije i lepse objasniti

Citat: Wucha poslato Novembar 14, 2017, 11:09:21 PRE PODNE
Ovo je bas za pocetnike ,mogao si malo slozenije i lepse objasniti

Pa ovo je najednoatavnije takodje molim moderatora da edituje nesto oko teme ima problem lose sam objasnio jedan deo

Dobar tut, ali ne optimizovano :D Al svakako nemam sta da ti zamerim odlicno.