[Pomoc] Gorivo i Textdraw

Započeo Angle, Septembar 02, 2012, 21:38:40 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 5 gostiju pregledaju ovu temu.

Skripta koju koristim: Private
Detaljan opis problema: Imam codove, ali ne znam kako da editujem i da napravim ovo kada neko dodje na pumpu kuca /fill otvori DIALOG_STYLE_LIST prozor i tu pise Benzin, Dizel kada pritisne na neko od ta dva izadje da upise koliko hoce goriva to upise u Input prozorcic mali koji se korisit prilikom logina.. kada upise cifru izaci ce ako je pritisnuo Benzin 20 litara natocio u chat ce izaci text samo njemu: Natocio si 20 litara Benzina a ako je natocio Dizel 20 litara izaci ce text Natocio si 20 litara Dizela.. Hvala svima koji pomognu
Dio skripte:
if(strcmp(cmd, "/fill", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
    {
      ShowPlayerDialog(playerid,12345,"Vrste goriva","Benzin\nDizel","Ok","Izadji");
    }
if(IsAtGasStation(playerid))
{
    if(Gas[idcar] <= 99)
    {
    TogglePlayerControllable(playerid, 0);
    GameTextForPlayer(playerid,"~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Rezervoar se puni, sacekajte!",3000,3);
SetTimer("Fillup",RefuelWait,0);
Refueling[playerid] = 1;
}
else
{
    GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~kanister je pun",3000,4);
}
}
else
{
SendClientMessage(playerid,COLOR_GREY,"[GRESKA] Niste na Pumpi!");
}
}
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): //

Skripta koju koristim: Private
Detaljan opis problema: Napisao sam sve tamo gdje je slika
Dio skripte:
Textdraw60 = TextDrawCreate(32.000000, 3.000000, "E.");
TextDrawAlignment(Textdraw60, 3);
TextDrawBackgroundColor(Textdraw60, 0x00C0FF);
TextDrawFont(Textdraw60, 2);
TextDrawLetterSize(Textdraw60, 0.559998, 2.599998);
TextDrawColor(Textdraw60, 0xF81414);
TextDrawSetOutline(Textdraw60, 1);
TextDrawSetProportional(Textdraw60, 1);
TextDrawUseBox(Textdraw60, 1);
TextDrawBoxColor(Textdraw60, 0xAA3333AA);
TextDrawTextSize(Textdraw60, 353.000000, 82.000000);

Textdraw61 = TextDrawCreate(32.000000, 32.000000, "T.");
TextDrawAlignment(Textdraw61, 3);
TextDrawBackgroundColor(Textdraw61, 0xFFFFFFAA);
TextDrawFont(Textdraw61, 2);
TextDrawLetterSize(Textdraw61, 0.559998, 2.599998);
TextDrawColor(Textdraw61, 0xFFFFFFAA);
TextDrawSetOutline(Textdraw61, 1);
TextDrawSetProportional(Textdraw61, 1);
TextDrawUseBox(Textdraw61, 1);
TextDrawBoxColor(Textdraw61, 0x000000FF);
TextDrawTextSize(Textdraw61, 353.000000, 82.000000);

Textdraw62 = TextDrawCreate(32.000000, 61.000000, "C.");
TextDrawAlignment(Textdraw62, 3);
TextDrawBackgroundColor(Textdraw62, 0xFFFFFFAA);
TextDrawFont(Textdraw62, 2);
TextDrawLetterSize(Textdraw62, 0.549997, 2.599997);
TextDrawColor(Textdraw62, 0x000000FF);
TextDrawSetOutline(Textdraw62, 1);
TextDrawSetProportional(Textdraw62, 1);
TextDrawUseBox(Textdraw62, 1);
TextDrawBoxColor(Textdraw62, 0xAA3333AA);
TextDrawTextSize(Textdraw62, 353.000000, 82.000000);

Neke slike/video za lakse dobivanje pomoci(neobavezno): http://i.imgur.com/tBJwr.jpg
evo vidite ovo E T C tu neka kod slova E kocka bude crvena ostavite ovako.. slovo E Plavo oko njega bijela boja, kocka slova T neka bude bijela slovo T neka bude Bijelo oko njega boja plava, kocka slova C neka bude bijele boje C neka bude Crvene oko njega boja Crvena.. i malo smanjite ove kocke i slova

Hvala svima koji pomognu..

za benzin ne znam ali za ovo drugo samo zameni boje koje hoces imas TextDrawColor pa tu stavi boju koju hoces umesto onoga i trebace ti

new Text:Textdraw61;
new Text:Textdraw62;
new Text:Textdraw63;

da bi ti radio

TVOJU KOMANDU ZAMENI SA OVOM:

if(strcmp(cmd, "/fill", true) == 0)
{
if(IsPlayerConnected(playerid))
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREY,"[GRESKA] Niste u Vozilu!");
if(!IsAtGasStation(playerid)) return SendClientMessage(playerid,COLOR_GREY,"[GRESKA] Niste na Pumpi!");
if(Gas[idcar] <= 99) return GameTextForPlayer(playerid,"~r~~n~~n~~n~~n~~n~~n~~n~~n~~n~Kanister je pun",5000,4);
  ShowPlayerDialog(playerid, 4821, DIALOG_STYLE_LIST, "Izaberite vrstu goriva:", "Benzin\nDizel", "Izaberi", "Izadji");
    TogglePlayerControllable(playerid, 0);
}
return true;
}


Pod ONDIALOGRESPONSE DODAJ OVO:

if(dialogid == 4821)
{
if(respone)
{
    if(listitem == 0)
    {
    GorivoText[playerid] = "Benzina";
    TogglePlayerControllable(playerid, 0);
    ShowPlayerDialog(playerid,4822,DIALOG_STYLE_INPUT,"Pumpadzija:","Upisite koliko benzina zelite \nda sipate u vase vozilo:","Napuni","Izadji");
    }
    if(listitem == 1)
    {
    GorivoText[playerid] = "Dizela";
    TogglePlayerControllable(playerid, 0);
    ShowPlayerDialog(playerid,4822,DIALOG_STYLE_INPUT,"Pumpadzija:","Upisite koliko dizela zelite \nda sipate u vase vozilo:","Napuni","Izadji");
    }
}
else
{
SendClientMessage(playerid,-1,"Odustali ste od punjenja goriva !");
TogglePlayerControllable(playerid, 1);
}
}


I ispod toga(ISTO U ONDIALOGRESPONSE):

if(dialogid == 4822)
{
if(respone)
{
    new str[200];
    TogglePlayerControllable(playerid, 0);
    new v = GetPlayerVehicleID(playerid);
    if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");
    Gas[v] = inputtext;
    format(str,sizeof(str),"* [ PUMPA ] Napunio si %d litara %s",inputtext,GorivoText[playerid]);
    SendClientMessage(playerid,-1,str);
    GameTextForPlayer(playerid,"~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Rezervoar se puni, sacekajte!",3000,3);
SetTimer("Fillup",RefuelWait,0);
Refueling[playerid] = 1;
}
else
{
SendClientMessage(playerid,-1,"Odustali ste od punjenja goriva !");
TogglePlayerControllable(playerid, 1);
}
}



PS
POKUSAJ MALO DA RAZUMES OVO,A NE SAMO DA COPY/PASTE !


Ako jos nesto treba pisi.
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

E izbaci mi 5 errora kada upisem ove comande pod public OnDialogResponse

if(dialogid == 4821)
{
if(respone)
{
    if(listitem == 0)
    {
    GorivoText[playerid] = "Benzina";
    TogglePlayerControllable(playerid, 0);
    ShowPlayerDialog(playerid,4822,DIALOG_STYLE_INPUT,"Pumpadzija:","Upisite koliko benzina zelite \nda sipate u vase vozilo:","Napuni","Izadji");
    }
    if(listitem == 1)
    {
    GorivoText[playerid] = "Dizela";
    TogglePlayerControllable(playerid, 0);
    ShowPlayerDialog(playerid,4822,DIALOG_STYLE_INPUT,"Pumpadzija:","Upisite koliko dizela zelite \nda sipate u vase vozilo:","Napuni","Izadji");
    }
}
else
{
SendClientMessage(playerid,-1,"Odustali ste od punjenja goriva !");
TogglePlayerControllable(playerid, 1);
}
}

if(dialogid == 4822)
{
if(respone)
{
    new str[200];
    TogglePlayerControllable(playerid, 0);
    new v = GetPlayerVehicleID(playerid);
    if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");
    Gas[v] = inputtext;
    format(str,sizeof(str),"* [ PUMPA ] Napunio si %d litara %s",inputtext,GorivoText[playerid]);
    SendClientMessage(playerid,-1,str);
    GameTextForPlayer(playerid,"~b~~n~~n~~n~~n~~n~~n~~n~~n~~n~Rezervoar se puni, sacekajte!",3000,3);
SetTimer("Fillup",RefuelWait,0);
Refueling[playerid] = 1;
}
else
{
SendClientMessage(playerid,-1,"Odustali ste od punjenja goriva !");
TogglePlayerControllable(playerid, 1);
}
}


Evo errori:

C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26069) : error 017: undefined symbol "respone"
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26073) : error 017: undefined symbol "GorivoText"
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26073) : warning 215: expression has no effect
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26073) : error 001: expected token: ";", but found "]"
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26073) : error 029: invalid expression, assumed zero
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(26073) : fatal error 107: too many error messages on one line

Poslednja Izmena: Septembar 03, 2012, 08:16:19 PRE PODNE od gogi

Sada mi izbacilo 6 errora

C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24838) : error 017: undefined symbol "respone"
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24842) : error 006: must be assigned to an array
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24848) : error 006: must be assigned to an array
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24861) : error 017: undefined symbol "respone"
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24866) : error 033: array must be indexed (variable "inputtext")
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24867) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.


Evi linije errora

24838: if(respone)
24842: GorivoText[playerid] = "Benzina";
24848: GorivoText[playerid] = "Dizela";
24861: if(respone)
24866: if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");
24867: Gas[v] = inputtext;


Pogledajte..
Poslednja Izmena: Septembar 03, 2012, 11:28:52 PRE PODNE od gogi

Nije if(respone  nego if(response).
ODSUTAN

Citat: Daniel Zero poslato Septembar 03, 2012, 13:54:35 POSLE PODNE
Nije if(respone  nego if(response).

ok sada su 4 errora

C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24842) : error 006: must be assigned to an array
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24848) : error 006: must be assigned to an array
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24866) : error 033: array must be indexed (variable "inputtext")
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24867) : error 006: must be assigned to an array
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Linije codova koje kaze da ne valjaju:
24842: GorivoText[playerid] = "Benzina";
24848: GorivoText[playerid] = "Dizela";
24866: if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");
24867: Gas[v] = inputtext;

Citat: Daniel Zero poslato Septembar 03, 2012, 15:05:23 POSLE PODNE
za GorivoText moras staviti broj ,  a Gas[v] zameni sa Gas[MAX_VEHICLES]

Sta lupetas ti ?

Varijabla Gas[MAX_VEHICLE]; mu je vec definisana,a kakav broj za GorivoText kad to nije globalna varijabla?
@Autor - Samo stavi na vrh moda new GorivoText[MAX_PLAYERS][52];
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

Citat: ''KopriVa' poslato Septembar 03, 2012, 15:16:04 POSLE PODNE
Citat: Daniel Zero poslato Septembar 03, 2012, 15:05:23 POSLE PODNE
za GorivoText moras staviti broj ,  a Gas[v] zameni sa Gas[MAX_VEHICLES]

Sta lupetas ti ?

Varijabla Gas[MAX_VEHICLE]; mu je vec definisana,a kakav broj za GorivoText kad to nije globalna varijabla?
@Autor - Samo stavi na vrh moda new GorivoText[MAX_PLAYERS][52];

E kada sam to stavio izasao je samo 1 error

C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24866) : error 033: array must be indexed (variable "inputtext")
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24865) : warning 204: symbol is assigned a value that is never used: "v"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Code evo linija
24865: new v = GetPlayerVehicleID(playerid);
23866: if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");


Citat: gogi poslato Septembar 03, 2012, 15:19:18 POSLE PODNE
Citat: ''KopriVa' poslato Septembar 03, 2012, 15:16:04 POSLE PODNE
Citat: Daniel Zero poslato Septembar 03, 2012, 15:05:23 POSLE PODNE
za GorivoText moras staviti broj ,  a Gas[v] zameni sa Gas[MAX_VEHICLES]

Sta lupetas ti ?

Varijabla Gas[MAX_VEHICLE]; mu je vec definisana,a kakav broj za GorivoText kad to nije globalna varijabla?
@Autor - Samo stavi na vrh moda new GorivoText[MAX_PLAYERS][52];

E kada sam to stavio izasao je samo 1 error

C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24866) : error 033: array must be indexed (variable "inputtext")
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24865) : warning 204: symbol is assigned a value that is never used: "v"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Code evo linija
24865: new v = GetPlayerVehicleID(playerid);
23866: if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");


Ups,moja greska sry:

Zameni ovaj red: if(inputtext < 1 || inputtext > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");

Sa ovim:

new kolicina = strval(inputtext);
if(kolicina < 1 || kolicina > 100) return SendClientMessage(playerid,-1,"Minimalna kolicina goriva je 1L,a maksimalna 100L !");



Citat: BokiProSkripter poslato Septembar 03, 2012, 15:22:52 POSLE PODNE
Gogi skripter svaka cast gogi!!!

Stop SPAM ?!
Izvinjavam se na svim glupostima i ako sam nekome napisao nesto lose, neko drugi je koristio moj profil!
__________________________________________
https://bk.gta.world - GTA World Balkan - RAGEMP

Citat: BokiProSkripter poslato Septembar 03, 2012, 15:22:52 POSLE PODNE
Gogi skripter svaka cast gogi!!!

Sta je tebi ja ne znam scripati jos... vidis da ucim iz ovoga sto mi oni postave da bi znao nesto vise.. hvala vama svima koji mi pomazete pogotovo tebi kopriva

@KopriVa sada ima samo jedan warning
C:\Users\pc01\Desktop\BalkanExtazy[FINAL VERSION]\BE\gamemodes\besp.pwn(24865) : warning 204: symbol is assigned a value that is never used: "v"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.


linija coda koji ima warning
new v = GetPlayerVehicleID(playerid);
Poslednja Izmena: Septembar 03, 2012, 15:41:50 POSLE PODNE od gogi

Samo izbrisi taj red gdje je warning!
Mysterious roleplay

Evo ga sada je sve super bez warninga

e ima problem.. ja dodjem na benzinsku i kuca /fill ono meni kaze da je kanister pun sto znaci da ono ne puni u auto gotivo nego u kanister a ja hocu da u auto puni.. ostalo mi 95 litara u autu ja kuca /fill ono kaze kanister je pun
Poslednja Izmena: Septembar 03, 2012, 16:13:11 POSLE PODNE od gogi