Problem: Ubacio sam sistem tdboje,kada ukucam /bojatd prmojene se samo neki tdovi iako su svi define-ovani u skripti
Deo skripte(ovo je new): [pawn]new Text:TDEditor_TD[38];[/pawn]
Deo skripte(ovo je cmd): [pawn]
CMD:bojatd(playerid, params[])
{
new stringic[128];
if(sscanf(params, "s[24]", stringic)) return KORISCENJE(playerid, "/bojatd [crvena-default-zuta-narandzasta-roza]");
if(strcmp(stringic, "crvena", true) == 0)
{
TextDrawColor(TDEditor_TD[1], 0xDB1605FF);
TextDrawColor(TDEditor_TD[17], 0xDB1605FF);
TextDrawColor(TDEditor_TD[19], 0xDB1605FF);
TextDrawColor(TDEditor_TD[25], 0xDB1605FF);
TextDrawColor(TDEditor_TD[27], 0xDB1605FF);
TextDrawColor(TDEditor_TD[31], 0xDB1605FF);
TextDrawColor(TDEditor_TD[33], 0xDB1605FF);
TextDrawColor(TDEditor_TD[35], 0xDB1605FF);
TextDrawColor(TDEditor_TD[36], 0xDB1605FF);
TextDrawColor(TDEditor_TD[37], 0xDB1605FF);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[17]);
TextDrawShowForPlayer(playerid,TDEditor_TD[19]);
TextDrawShowForPlayer(playerid,TDEditor_TD[26]);
TextDrawShowForPlayer(playerid,TDEditor_TD[28]);
TextDrawShowForPlayer(playerid,TDEditor_TD[33]);
TextDrawShowForPlayer(playerid,TDEditor_TD[36]);
TextDrawShowForPlayer(playerid,TDEditor_TD[37]);
}
if(strcmp(stringic, "default", true) == 0)
{
TextDrawColor(TDEditor_TD[1], 7596799);
TextDrawColor(TDEditor_TD[17], 7596799);
TextDrawColor(TDEditor_TD[19], 7596799);
TextDrawColor(TDEditor_TD[25], 7596799);
TextDrawColor(TDEditor_TD[27], 7596799);
TextDrawColor(TDEditor_TD[31], 7596799);
TextDrawColor(TDEditor_TD[33], 0xFFFFFFFF);
TextDrawColor(TDEditor_TD[35], 7596799);
TextDrawColor(TDEditor_TD[36], 7596799);
TextDrawColor(TDEditor_TD[37], 7596799);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[17]);
TextDrawShowForPlayer(playerid,TDEditor_TD[19]);
TextDrawShowForPlayer(playerid,TDEditor_TD[26]);
TextDrawShowForPlayer(playerid,TDEditor_TD[28]);
TextDrawShowForPlayer(playerid,TDEditor_TD[33]);
TextDrawShowForPlayer(playerid,TDEditor_TD[36]);
TextDrawShowForPlayer(playerid,TDEditor_TD[37]);
}
if(strcmp(stringic, "zuta", true) == 0)
{
TextDrawColor(TDEditor_TD[1], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[17], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[19], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[25], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[27], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[31], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[33], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[35], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[36], 0xFFFF00AA);
TextDrawColor(TDEditor_TD[37], 0xFFFF00AA);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[17]);
TextDrawShowForPlayer(playerid,TDEditor_TD[19]);
TextDrawShowForPlayer(playerid,TDEditor_TD[26]);
TextDrawShowForPlayer(playerid,TDEditor_TD[28]);
TextDrawShowForPlayer(playerid,TDEditor_TD[33]);
TextDrawShowForPlayer(playerid,TDEditor_TD[36]);
TextDrawShowForPlayer(playerid,TDEditor_TD[37]);
}
if(strcmp(stringic, "narandzasta", true) == 0)
{
TextDrawColor(TDEditor_TD[1], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[17], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[19], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[25], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[27], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[31], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[33], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[35], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[36], 0xFFAF00FF);
TextDrawColor(TDEditor_TD[37], 0xFFAF00FF);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[17]);
TextDrawShowForPlayer(playerid,TDEditor_TD[19]);
TextDrawShowForPlayer(playerid,TDEditor_TD[26]);
TextDrawShowForPlayer(playerid,TDEditor_TD[28]);
TextDrawShowForPlayer(playerid,TDEditor_TD[33]);
TextDrawShowForPlayer(playerid,TDEditor_TD[36]);
TextDrawShowForPlayer(playerid,TDEditor_TD[37]);
}
if(strcmp(stringic, "roza", true) == 0)
{
TextDrawColor(TDEditor_TD[1], 0xDF0172FF);
TextDrawColor(TDEditor_TD[17], 0xDF0172FF);
TextDrawColor(TDEditor_TD[19], 0xDF0172FF);
TextDrawColor(TDEditor_TD[25], 0xDF0172FF);
TextDrawColor(TDEditor_TD[27], 0xDF0172FF);
TextDrawColor(TDEditor_TD[31], 0xDF0172FF);
TextDrawColor(TDEditor_TD[33], 0xDF0172FF);
TextDrawColor(TDEditor_TD[35], 0xDF0172FF);
TextDrawColor(TDEditor_TD[36], 0xDF0172FF);
TextDrawColor(TDEditor_TD[37], 0xDF0172FF);
TextDrawShowForPlayer(playerid,TDEditor_TD[1]);
TextDrawShowForPlayer(playerid,TDEditor_TD[17]);
TextDrawShowForPlayer(playerid,TDEditor_TD[19]);
TextDrawShowForPlayer(playerid,TDEditor_TD[26]);
TextDrawShowForPlayer(playerid,TDEditor_TD[28]);
TextDrawShowForPlayer(playerid,TDEditor_TD[33]);
TextDrawShowForPlayer(playerid,TDEditor_TD[36]);
TextDrawShowForPlayer(playerid,TDEditor_TD[37]);
}
SendClientMessage(playerid,-1,"{37A4DB}[BOJATD] {FFFFFF}Uspesno ste promenili boju TD-ova.");
return 1;
}[/pawn]
Debug iz server_log: //
Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/gallery/7lzCfyv (https://imgur.com/gallery/7lzCfyv)
Proveri jesi li izabrao dobre tdove, da nisi neke druge
Nisi ubacio sve iz arraya...
Ideš od 1 do 37 i onda ce sve samo ostavi crne boxove
vidiš ti ideš 1 pa posle njega 17...
TextDrawColor(TDEditor_TD[1], 0xDB1605FF);
TextDrawColor(TDEditor_TD[2], 0xDB1605FF);
TextDrawColor(TDEditor_TD[3], 0xDB1605FF);
i tako do 37
Citat: ᗪ卂乂 poslato Jul 03, 2020, 18:47:44 POSLE PODNE
Nisi ubacio sve iz arraya...
Ideš od 1 do 37 i onda ce sve samo ostavi crne boxove
vidiš ti ideš 1 pa posle njega 17...
TextDrawColor(TDEditor_TD[1], 0xDB1605FF);
TextDrawColor(TDEditor_TD[2], 0xDB1605FF);
TextDrawColor(TDEditor_TD[3], 0xDB1605FF);
i tako do 37
Pa nece da mu sve tdove promenit nego samo one koji nisu black..
Citat: inquisitiveemmett poslato Jul 03, 2020, 19:07:49 POSLE PODNE
Pa nece da mu sve tdove promenit nego samo one koji nisu black..
Sve radi kada odem relog,ne vidim razlog zasto se sada ne pojavljuju u in game iste sekunde kad i ostali
E ovako evo ti opsirno :)
Ako ubacujes od 0 TDove ako ih mod vec nema a i slican ti je postupak i sa modom koji ima samo ih zameni ovako:
napravi jedan deo
//======VARIJABLE/TEXTDRAVOVOI(KAKO TI HOCES)=========================//
tu stavi ono new TextDraw(kako ti vec pise..
onda ides u GamemodeInit tu ubacis ovo textdraw ono znas drugo
onda odes onplayerspawn u kucas ovako
TextDrawShowForPlayer(playerid, i kako ti se zovu ona prva rec pre = );
ja sam to radio xd, proveri da li si te stavio
Menjas boju na 10 textdrawa dok ponovo show-as samo 8 textdrawa, show-aj sve tdove na koje promenis boju.
Citat: Claus poslato Jul 03, 2020, 22:09:03 POSLE PODNE
Menjas boju na 10 textdrawa dok ponovo show-as samo 8 textdrawa, show-aj sve tdove na koje promenis boju.
Zahvaljujem <3