Započeo Risticc
•7. Feb. 2024.Pomoc oko auto skola test
401
pregleda
7
postova
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
156
Postovi:
45
Teme:
Pridružio se:Apr. 2020
7. Feb. 2024.
E ovako, napravio sam sistem pismenog dela auto skole, medjutim sada mi nije jasno kako da fiksam bug da ne moze vise puta da se klikne na isto( jer bukvalno spamujes koliko bodova zelis da dobijes )... Ako stavim neke druge provere onda se sjebe zbog nekih drugih pitanja, ostavicu ovde prva 2 pitanja da bih znao kako da nastavim... Mozda je ocigledno ali ja to ne vidim, hvala svima
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1 ) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_B") == 1 ) {
SetPVarInt(playerid, "kliknuto_A", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
if (PolaganjeBodovi >= 0) {
PolaganjeBodovi--;
}
TextDrawColor(ASTestTD, 0x7C7C7CFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
}
}
}
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1 ) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_A") == 1) {
SetPVarInt(playerid, "kliknuto_B", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
PolaganjeBodovi++;
TextDrawColor(ASTestTD, 0x7C7C7CFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
}
}
}
// 2 PITANJE
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1 ) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 2 || GetPVarInt(playerid, "kliknuto_B") == 1 ) {
SetPVarInt(playerid, "kliknuto_A", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 3);
if (PolaganjeBodovi >= 0) {
PolaganjeBodovi--;
}
TextDrawColor(ASTestTD, 0x7C7C7CFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
}
}
}
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1 ) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 2 || GetPVarInt(playerid, "kliknuto_A") == 1) {
SetPVarInt(playerid, "kliknuto_B", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 3);
PolaganjeBodovi++;
TextDrawColor(ASTestTD, 0x7C7C7CFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
}
}
}
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,136
Postovi:
10
Teme:
Pridružio se:Maj 2015
Shot Caller
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
90 / 100 XP
Početnik(0)
156
Postovi:
45
Teme:
Pridružio se:Apr. 2020
8. Feb. 2024.
Stavio sam, ali sad imam drugi problem nepoznat, kad kliknem na textdraw 9, pa na textdraw 10, i opet probam na 9, ne da mi znaci kao da je ugasen selectable?
if (PolaganjePoceo != 0) {
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_B") == 1) {
SetPVarInt(playerid, "kliknuto_A", 1);
SetPVarInt(playerid, "kliknuto_B", 0); // Reset kliknuto_B
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
PolaganjeBodovi++;
TextDrawColor(ASTestTD, 0x808080FF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawSetSelectable(ASTestTD, false);
TextDrawSetSelectable(ASTestTD, true);
SendInfoMessage(playerid, "Dodat bod");
}
}
} else if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_A") == 1) {
SetPVarInt(playerid, "kliknuto_A", 0); // Reset kliknuto_A
SetPVarInt(playerid, "kliknuto_B", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
TextDrawColor(ASTestTD, 0x808080FF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawSetSelectable(ASTestTD, true);
TextDrawSetSelectable(ASTestTD, false);
SendInfoMessage(playerid, "Skinut bod");
}
}
}
Kingpin
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
1,136
Postovi:
10
Teme:
Pridružio se:Maj 2015
9. Feb. 2024.
Risticc wrote on February 8, 2024, 12:26 pm:
Stavio sam, ali sad imam drugi problem nepoznat, kad kliknem na textdraw 9, pa na textdraw 10, i opet probam na 9, ne da mi znaci kao da je ugasen selectable?
if (PolaganjePoceo != 0) {
if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_B") == 1) {
SetPVarInt(playerid, "kliknuto_A", 1);
SetPVarInt(playerid, "kliknuto_B", 0); // Reset kliknuto_B
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
PolaganjeBodovi++;
TextDrawColor(ASTestTD, 0x808080FF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawSetSelectable(ASTestTD, false);
TextDrawSetSelectable(ASTestTD, true);
SendInfoMessage(playerid, "Dodat bod");
}
}
} else if (clickedid == ASTestTD) {
if (GetPVarInt(playerid, "dialog_POKRENUTTEST") == 1) {
if (GetPVarInt(playerid, "dialog_POLAGANJE") == 1 || GetPVarInt(playerid, "kliknuto_A") == 1) {
SetPVarInt(playerid, "kliknuto_A", 0); // Reset kliknuto_A
SetPVarInt(playerid, "kliknuto_B", 1);
SetPVarInt(playerid, "dialog_POLAGANJE", 2);
TextDrawColor(ASTestTD, 0x808080FF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawColor(ASTestTD, 0xE7204EFF);
TextDrawShowForPlayer(playerid, ASTestTD);
TextDrawSetSelectable(ASTestTD, true);
TextDrawSetSelectable(ASTestTD, false);
SendInfoMessage(playerid, "Skinut bod");
}
}
}
O.O Pa sta je problem ako ti je poenta da ne mozes kliknuti 2x na isto😕 😄
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava