Firma System many errors .. :/ help
#1

(94) : error 010: invalid function or declaration
(99) : error 010: invalid function or declaration
(101) : error 021: symbol already defined: "INI_ParseFile"
(101) : error 010: invalid function or declaration
(101 -- 102) : error 010: invalid function or declaration
(101 -- 102) : fatal error 107: too many error messages on one line


(94) for(new b = 0; b < sizeof (FI); b++)
(99) if(fexist(gFile))
(101)
(101 -- 102) INI_ParseFile(gFile, "UcitajFirme", .bExtra = true, .extra = b);
if(FI[b][fPostavljena] == 1)



//-----------------------------All Script --------------------------------------------
#include <YSI\y_commands>
#include <YSI\y_ini>

#define FILTERSCRIPT

#define COL_EASY "{FFF1AF}"
#define COL_WHITE "{FFFFFF}"
#define COL_BLACK "{0E0101}"
#define COL_GREY "{C3C3C3}"
#define COL_GREEN "{6EF83C}"
#define COL_RED "{F81414}"
#define COL_YELLOW "{F3FF02}"
#define COL_ORANGE "{FFAF00}"
#define COL_LIME "{B7FF00}"
#define COL_CYAN "{00FFEE}"
#define COL_LIGHTBLUE "{00C0FF}"
#define COL_BLUE "{0049FF}"
#define COL_MAGENTA "{F300FF}"
#define COL_VIOLET "{B700FF}"
#define COL_PINK "{FF00EA}"
#define COL_MARONE "{A90202}"
#define COL_CMD "{B8FF02}"
#define COL_PARAM "{3FCD02}"
#define COL_SERVER "{AFE7FF}"
#define COL_VALUE "{A3E4FF}"
#define COL_RULE "{F9E8B7}"
#define COL_RULE2 "{FBDF89}"
#define COL_RWHITE "{FFFFFF}"
#define COL_LGREEN "{C9FFAB}"
#define COL_LRED "{FFA1A1}"
#define COL_LRED2 "{C77D87}"
/////////////////DIALOZI///////////
#define DIALOG_FIRMA 15111
#define DFIRMA_PODIZANJE 15112
#define DFIRMA_OSTAVLJANJE 15113
#define DFIRMA_NAZIV 15114
#define DFIRMA_PROIZVODI 15115
#define DFIRMA_PRODAJA 15116
#define MARKET_KUPOVINA 15117
#define KUPOVINA_SEXSHOP 15118
#define KUPOVINA_RESTORAN 15120
#define KUPOVINA_BURG 15121
#define DFIRMA_SKINIIZNUDU 15122
#define KUPOVINA_CLUCKIN 15123
#define KUPOVINA_PIZZA 15124
#define KUPOVINA_PICE 15125
#define KUPOVINA_BARBER 15127
#define DFIRMA_PRODAJESCENA 15144
#define DFIRMA_PRODAJAIGRACU 15145
//////////////////////NEWOVI/////////////////////////
new ProdajesFirmu[MAX_VEHICLES];
new CenaFirme[MAX_PLAYERS];
new IDfirme[MAX_PLAYERS];
new ProdavacFirme[MAX_PLAYERS];
new UsaoFirma[MAX_PLAYERS];
///////Logovi
#define LOG_KUPOVANJEFIRME "Logovi/kupovanjefirme.txt"
//IMOVINA
#define FIRMA_FILE "LSystems/firme/Firma_%d.ini"
//////define
#define SPD ShowPlayerDialog
#define SCM SendClientMessage
#define IPI INVALID_PLAYER_ID
#define SCMTA SendClientMessageToAll
#define DSL DIALOG_STYLE_LIST
#define DSM DIALOG_STYLE_MSGBOX
#define DSI DIALOG_STYLE_INPUT
#define HELPKOMANDA 118
#define fDFILE "DFILE_Test.txt"
#define fYINI "YINI_Test.txt"
//ZA FIRMU IDOVI
#define VRSTA_MARKET 1
#define VRSTA_BURG 2
#define VRSTA_CLUCKIN 3
#define VRSTA_PIZZA 4
#define VRSTA_PIGPEN 5
#define VRSTA_BAR 6
#define VRSTA_GYM 7
#define VRSTA_SEXSHOP 8
#define VRSTA_BINCO 9
#define VRSTA_GUNSHOP 10
#define VRSTA_DISCO 11
#define VRSTA_RESTORAN 12
#define VRSTA_ZIP 13
#define VRSTA_VICTIM 14
#define VRSTA_SUBURBAN 15
#define VRSTA_BARBER 16
#define VRSTA_KLADIONICA 17
#define VRSTA_AUTOSKOLA 21
#define VRSTA_ECBANKA 22
#define VRSTA_LVBANKA 23

//SYSTEMI
for(new b = 0; b < sizeof (FI); b++)
format gFile[35];
{
format(gFile, 50, "LSystems/firme/Firma_%d.ini" ,b);
}
if(fexist(gFile))
{
INI_ParseFile(gFile, "UcitajFirme", .bExtra = true, .extra = b);
if(FI[b][fPostavljena] == 1)
}
{
if(FI[b][fImaVlasnika] == 0)
{
format(string,sizeof(string),"[ %s ]\nFirma na prodaju!\nCena: $%d\nLevel: %d\nID: %d\nZa kupovinu /kupifirmu",FI[b][fNaziv],FI[b][fCena],FI[b][fLevel],b);
FirmaLabel[b] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ],15);
FirmaPickup[b] = CreateDynamicPickup(1239, 1, FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ]);
CreateDynamicMapIcon(FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ], 52, -1, -1, -1, -1, 100);
}
if(FI[b][fImaVlasnika] == 1)
{
format(string,sizeof(string),"{A7E7FF}[ %s ]\nVlasnik: %s\nLevel: %d\nIznuda: %s\nID: %d\nZa ulaz koristi 'F'",FI[b][fNaziv],FI[b][fVlasnik],FI[b][fLevel],FI[b][fIznuda],b);
FirmaLabel[b] = CreateDynamic3DTextLabel(string ,BELA,FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ],15);
FirmaPickup[b] = CreateDynamicPickup(19132, 1, FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ]);
CreateDynamicMapIcon(FI[b][fUlazX], FI[b][fUlazY], FI[b][fUlazZ], 36, -1, -1, -1, -1, 100);
}
printf(" Y_INI | Firma %d ucitan",b);
}
}
}

for(new b = 0; b < sizeof(HI); b++)
{
if(dialogid == DIALOG_FIRMA && response)
{
if(response)
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
switch(listitem)
{
case 0:
{
new z[3];
if(FI[i][fZatvoreno] == 1) z = "Da";
else z = "Ne";
SCM(playerid,-1,"|--------------------------------------------------------------------------------|");
SCMF(playerid,-1,"- Naziv Firme: %s | Reket: %s",FI[i][fNaziv],FI[i][fIznuda]);
SCMF(playerid,-1,"- Vlasnik Firme: %s | Level: %d | Cena: %d", FI[i][fVlasnik], FI[i][fLevel],FI[i][fCena]);
SCMF(playerid,-1,"- ID: %d | Zatvoreno: %s | Kasa: $%d | Proizvodi: %d/%d", i, z, FI[i][fKasa], FI[i][fProizvodi], FI[i][fMaxProizvodi]);
SCM(playerid,-1,"|--------------------------------------------------------------------------------|");
}
case 1:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 3, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ]) && !IsPlayerInRangeOfPoint(playerid, 3, FI[klj][fUlazX], FI[klj][fUlazY], FI[klj][fUlazZ])) return SCM(playerid,SIVA,"Niste ispred vrata.");
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
if(FI[i][fZatvoreno] == 0) return SCM(playerid,SIVA,"Vec je otkljucana!");
FI[i][fZatvoreno] = 0;
SCM(playerid,-1, "Firma otkljucana!");
SacuvajFirmu(i);
}
case 2:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 3, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ]) && !IsPlayerInRangeOfPoint(playerid, 3, FI[klj][fUlazX], FI[klj][fUlazY], FI[klj][fUlazZ])) return SCM(playerid,SIVA,"Niste ispred vrata.");
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
if(FI[i][fZatvoreno] == 1) return SCM(playerid,SIVA,"Vec je zakljucana!");
FI[i][fZatvoreno] = 1;
SCM(playerid,-1, "Firma zakljucana!");
SacuvajFirmu(i);
}
case 3:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 100, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ])) return SCM(playerid,SIVA,"Niste u firmi.");
format(string,sizeof(string), "Unesite kolicinu novca koji zelite da podignete\nU kasi trenutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, "Dizanje novca iz Firme", string, "Podigni", "Izlaz");
}
case 4:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 100, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ])) return SCM(playerid,SIVA,"Niste u firmi.");
format(string,sizeof(string), "Upisite kolicinu novca koji zelite da ostavite u firmu\nU kasi treutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, "Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
}
case 5:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 100, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ])) return SCM(playerid,SIVA,"Niste u firmi.");
SPD(playerid, DFIRMA_PROIZVODI, DIALOG_STYLE_INPUT, "Proizvodi Narucivanje", "Upisite kolicinu proizvoda koju zelite da narucite!\nCena po proizvodu je 20$!", "Naruci", "Izlaz");
}
case 6:
{
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 100, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ])) return SCM(playerid,SIVA,"Niste u firmi.");
SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, "Firma Ime", "Upisite novo ime firme\nZabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
}
case 7:
{
if(ProdajesFirmu[playerid] == 1) return SCM(playerid,SIVA,"Prodajes firmu nekim igracu");
new klj = PI[playerid][pKljucFirme];
if(!IsPlayerInRangeOfPoint(playerid, 100, FI[klj][fIzlazX], FI[klj][fIzlazY], FI[klj][fIzlazZ])) return SCM(playerid,SIVA,"Niste u firmi.");
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new cena1 = (FI[i][fCena]/4)*2;
format(string,sizeof(string), "Prodaja firme drzavi\n\nDa li ste sigurni da zelite da prodate firmu drzavi za $%d!\n\nAko ste sigurni kliknite na 'Prodaj' ako ne kliknite na 'Izlaz'", cena1);
SPD(playerid, DFIRMA_PRODAJA, DSM, "Prodaja firme drzavi", string, "Prodaj", "Izlaz");
}
case 8:
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
SPD(playerid,DFIRMA_PRODAJAIGRACU,DIALOG_STYLE_INP UT,"Prodaja firme","Unesi ID igraca kojim zelis prodati firmu","Unesi","Izadji");
}
/*case 8:
{
strmid(FI[i][fIznuda], "Niko", 0, strlen("Niko"), 255);
SCM(playerid,-1, "Uklonili ste iznudu sa svoje firme!");
FirmaLabelIPickup(i);
SacuvajFirmu(i);
}*/
}
}
}
if(dialogid == DFIRMA_PRODAJAIGRACU)
{
if(response)
{
new id;
if(sscanf(inputtext, "d", id)) return SPD(playerid,DFIRMA_PRODAJAIGRACU,DIALOG_STYLE_INP UT,"Prodaja firme","Unesi ID igraca kojim zelis prodati firmu","Unesi","Izadji");
if(!IsPlayerConnected(id)) return SCM(playerid,-1,"Taj igrac nije na serveru");
if(playerid == id) return SCM(playerid,-1,"Ne mozes sebi prodati firmu");
if(PI[id][pKljucFirme] != 255) return SCM(playerid,-1,"Taj igrac poseduje firmu");
if(!ProxDetectorS(5.0,playerid,id)) return SCM(playerid,-1,"Taj igrac nije blizu tebe");
if(IgracKProdajes[playerid] > -1) return SCM(playerid,-1,"Vec prodajes nekome firmu");
IgracKProdajes[playerid] = id;
ProdavacFirme[id] = playerid;
SPD(playerid,DFIRMA_PRODAJESCENA,DIALOG_STYLE_INPU T,"Cena firme","Unesi sumu za koji zelis da prodas firmu","Prodaj","Izadji");
}
}
if(dialogid == DFIRMA_PRODAJESCENA)
{
if(!response) return IgracKProdajes[playerid] = -1;
{
new cena;
if(sscanf(inputtext, "i", cena)) return SPD(playerid,DFIRMA_PRODAJESCENA,DIALOG_STYLE_INPU T,"Cena firme","Unesi sumu za koji zelis da prodas firmu","Prodaj","Izadji");
if(cena < 1)
{
SPD(playerid,DFIRMA_PRODAJESCENA,DIALOG_STYLE_INPU T,"Cena firme","Unesi kolicinu novca za koju zelis da prodas firmu","Prodaj","Izadji");
SCM(playerid,-1,"Ne mozes ici ispod 1");
return 1;
}
CenaFirme[IgracKProdajes[playerid]] = cena;
IDfirme[IgracKProdajes[playerid]] = PI[playerid][pKljucFirme];
format(string,sizeof(string),"Igrac %s vam je ponudio da kupite firmu za %d$,kucajte /accept bizz",ImePrezime(playerid),cena);
SCM(IgracKProdajes[playerid],-1,string);
format(string,sizeof(string),"Ponudio si firmu igracu %s",ImePrezime(IgracKProdajes[playerid]));
SCM(playerid,-1,string);
ProdajesFirmu[playerid] = 1;
}
}
if(dialogid == DFIRMA_PRODAJA)
{
if(ProdajesFirmu[playerid] == 1) return SCM(playerid,SIVA,"Vec prodajes kucu nekim igracu");
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
if(response)
{
JBC_SetPlayerPos(playerid, FI[i][fUlazX], FI[i][fUlazY], FI[i][fUlazZ]);
new cena1 = (FI[i][fCena]/4)*2;
King_DajIgracuNovac(playerid,cena1);
SetPlayerInterior(playerid,0);
SetPlayerVirtualWorld(playerid,0);
FI[i][fImaVlasnika] = 0;
FI[i][fKasa] = 0;
FI[i][fZatvoreno] = 1;
strmid(FI[i][fIznuda],"Niko",0,strlen("Niko"),255);
strmid(FI[i][fVlasnik], "Niko", 0, strlen("Niko"), 255);
PI[playerid][pKljucFirme] = 255;
SacuvajFirmu(i);
FirmaLabelIPickup(i);
SCMF(playerid,-1,"Prodali ste firmu drzavi za $%d!",cena1);
SacuvajIgraca(playerid);
}
}
if(dialogid == DFIRMA_PODIZANJE)
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
if(response)
{
new iznos;
if(sscanf(inputtext, "i", iznos))
{
format(string,sizeof(string), "Pogresan Iznos!\nUnesite kolicinu novca koji zelite da podignete\nU kasi trenutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, "Dizanje novca iz Firme", string, "Podigni", "Izlaz");
return 1;
}
if(iznos > FI[i][fKasa])
{
SCM(playerid,SIVA, "Nemate toliko novca u kasi!");
format(string,sizeof(string), "Nemate toliko novca u kasi!\nUnesite kolicinu novca koji zelite da podignete\nU kasi trenutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, "Dizanje novca iz Firme", string, "Podigni", "Izlaz");
return 1;
}
if(iznos < 1 || iznos > 1000000)
{
SCM(playerid,SIVA,"Suma ne moze biti manja od 1$ i vec od 1000000$!");
format(string,sizeof(string), "Suma ne moze biti manja od 1$ i vec od 1000000$!\nUnesite kolicinu novca koji zelite da podignete\nU kasi trenutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, "Dizanje novca iz Firme", string, "Podigni", "Izlaz");
return 1;
}
FI[i][fKasa] -= iznos;
King_DajIgracuNovac(playerid, iznos);
SacuvajFirmu(i);
SCMF(playerid,-1, "Podigli ste $%d novca iz firme!", iznos);
new logstr[128];
format(logstr,sizeof(logstr),"[FIRMA UZIMANJE NOVCA] || Igrac %s || Novca %d$ || ID firme %d",GetName(playerid),iznos,i);
LogZapisi(LOG_DAVANJENOVCA,logstr);
SacuvajIgraca(playerid);
}
}
if(dialogid == DFIRMA_OSTAVLJANJE)
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
if(response)
{
new iznos;
if(sscanf(inputtext, "i", iznos))
{
format(string,sizeof(string), "Upisite kolicinu novca koji zelite da ostavite u firmu\nU kasi treutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, "Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
return 1;
}
if(iznos > PI[playerid][pCash])
{
SCM(playerid,SIVA, "Nemate toliko novca!");
format(string,sizeof(string), "Nemate toliko novca!\nUpisite kolicinu novca koji zelite da ostavite u firmu\nU kasi treutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, "Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
return 1;
}
if(iznos < 1 || iznos > 1000000)
{
SCM(playerid,SIVA,"Suma ne moze biti manja od 1$ i vec od 1000000$!");
format(string,sizeof(string), "Suma ne moze biti manja od 1$ i vec od 1000000$!\nUpisite kolicinu novca koji zelite da ostavite u firmu\nU kasi trenutno ima $%d!", FI[i][fKasa]);
SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, "Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
return 1;
}
FI[i][fKasa] += iznos;
King_DajIgracuNovac(playerid, -iznos);
SacuvajFirmu(i);
SCMF(playerid,-1,"Ostavili ste $%d novca u firmu!", iznos);
new logstr[128];
format(logstr,sizeof(logstr),"[FIRMA OSTAVLJANJE NOVCA] || Igrac %s || Novca %d$ || ID firme %d",GetName(playerid),iznos,i);
LogZapisi(LOG_DAVANJENOVCA,logstr);
SacuvajIgraca(playerid);
}
}
if(dialogid == DFIRMA_PROIZVODI)
{
if(response)
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
new pr;
if(sscanf(inputtext, "i", pr)) return SPD(playerid, DFIRMA_PROIZVODI, DIALOG_STYLE_INPUT, "Proizvodi Narucivanje", "Upisite kolicinu proizvoda koju zelite da narucite!\nCena po proizvodu je 20$!", "Naruci", "Izlaz");
if(pr < 1 || pr > 100)
{
SCM(playerid,SIVA,"Ne moze manje od 1 i vise od 100 proizvoda da se naruci!");
SPD(playerid, DFIRMA_PROIZVODI, DIALOG_STYLE_INPUT, "Proizvodi Narucivanje", "Ne moze manje od 1 i vise od 100 proizvoda da se naruci!\nUpisite kolicinu proizvoda koju zelite da narucite!\nCena po proizvodu je 20$!", "Naruci", "Izlaz");
return 1;
}
new cena = pr*20;
new ukupno = pr + FI[i][fProizvodi];
if(cena > FI[i][fKasa])
{
SCM(playerid,SIVA,"Nemate dovoljno novca u kasi!");
SPD(playerid, DFIRMA_PROIZVODI, DIALOG_STYLE_INPUT, "Proizvodi Narucivanje", "Nemate dovoljno novca u kasi!\nUpisite kolicinu proizvoda koju zelite da narucite!\nCena po proizvodu je 20$!", "Naruci", "Izlaz");
return 1;
}
if(ukupno > FI[i][fMaxProizvodi]) return SCMF(playerid,SIVA,"Maximalano proizvoda u ovoj firmi je %d!", FI[i][fMaxProizvodi]);
FI[i][fKasa] -= cena;
FI[i][fProizvodi] += pr;
SacuvajFirmu(i);
SCMF(playerid,-1,"Kupili ste %d proizvoda za $%d!", pr, cena);
SacuvajIgraca(playerid);
}
}

if(dialogid == DFIRMA_NAZIV)
{
if(response)
{
if(PI[playerid][pKljucFirme] == 255) return SCM(playerid,SIVA, "Nemate firmu!");
new i = PI[playerid][pKljucFirme];
new imeq[35];
if(sscanf(inputtext, "s[35]", imeq)) return SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, "Firma Ime", "Upisite novo ime firme\nZabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
if(strlen(imeq) > 35)
{
SCM(playerid,SIVA,"Ime firme ne moze sadrzavati vise od 35 znakova!");
SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, "Firma Ime", "Ime firme je predugacno!\nUpisite novo ime firme\nZabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
return 1;
}
if(strfind(imeq, "|") != -1) return SCM(playerid,SIVA, "Koriscenje znakova u imenu firme je zabranjeno!");
strmid(FI[i][fNaziv], imeq, 0, strlen(imeq), 255);
SCMF(playerid,-1, "Postavili ste ime firme na '%s'!", imeq);
FirmaLabelIPickup(i);
SacuvajFirmu(i);
SacuvajIgraca(playerid);
}
}
new firma[5];
if(PI[playerid][pKljucFirme] == 255) { firma = "Ne"; }
else if(PI[playerid][pKljucFirme] != 255) { firma = "Da"; }
Firma: %s",
kuca,stan,firma);
else if(strcmp(x_job,"bizz",true) == 0)
{
if(ProdavacFirme[playerid] == -1) return SCM(playerid,-1,"Niko ti nije ponudio prodaju firme");
if(!ProxDetectorS(5.0,playerid,ProdavacFirme[playerid])) return SCM(playerid,-1,"Prodavac firme nije blizu tebe");
if(PI[playerid][pCash] < CenaFirme[playerid]) return SCM(playerid,-1,"Nemas dovoljno novca da kupis firmu");
if(PI[playerid][pLevel] < FI[IDfirme[playerid]][fLevel]) return SCM(playerid,-1,"Nemas dovoljan level da bi kupio ovu firmu");
King_DajIgracuNovac(playerid,-CenaFirme[playerid]);
King_DajIgracuNovac(ProdavacFirme[playerid],CenaFirme[playerid]);
PI[playerid][pKljucFirme] = IDfirme[playerid];
PI[ProdavacFirme[playerid]][pKljucFirme] = 255;
format(string,sizeof(string),"Igrac %s je prihvatio firmu",ImePrezime(playerid));
SCM(ProdavacFirme[playerid],-1,string);
SCM(playerid,-1,"Prihvatio si firmu,kucaj /firma");
strmid(FI[IDfirme[playerid]][fVlasnik], ImePrezime(playerid), 0, strlen(ImePrezime(playerid)), 255);
FirmaLabelIPickup(IDfirme[playerid]);
ProdajesFirmu[ProdavacFirme[playerid]] = 0;
SacuvajFirmu(IDfirme[playerid]);
SacuvajIgraca(playerid);
SacuvajIgraca(ProdavacFirme[playerid]);
IgracKProdajes[ProdavacFirme[playerid]] = -1;
IDfirme[playerid] = -1;
CenaFirme[playerid] = -1;
ProdavacFirme[playerid] = -1;
}
//KUCE I FIRME
if( newkeys == KEY_SECONDARY_ATTACK )
{
for(new i; i < MAX_FIRMI; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, FI[i][fUlazX], FI[i][fUlazY], FI[i][fUlazZ]) && !IsPlayerInAnyVehicle(playerid))
{
if(FI[i][fZatvoreno] == 1) return SCM(playerid,SIVA,"Firma zakljucana!");
SetPlayerVirtualWorld(playerid, FI[i][fVW]);
SetPlayerInterior(playerid, FI[i][fInt]);
JBC_SetPlayerPos(playerid, FI[i][fIzlazX], FI[i][fIzlazY], FI[i][fIzlazZ]);
UsaoFirma[playerid] = i;

if(FI[i][fVrsta] == VRSTA_MARKET) SCM(playerid,SIVA,"Usli ste u market | Za kupovinu kucajte /buy.");
else if(FI[i][fVrsta] == VRSTA_SEXSHOP) SCM(playerid,SIVA,"Usli ste u sex shop | Za kupovinu kucajte /mkupi.");
else if(FI[i][fVrsta] == VRSTA_GUNSHOP) SCM(playerid,SIVA,"Usli ste u gun shop | Za kupovinu kucajte /buygun.");
else if(FI[i][fVrsta] == VRSTA_AUTOSKOLA) SCM(playerid,SIVA,"Usli ste u auto skolu | Za dozvole kucajte /buylic.");
else if(FI[i][fVrsta] == VRSTA_RESTORAN) SCM(playerid,SIVA,"Usli ste u restoran | Za listu jela kucajte /meni.");
else if(FI[i][fVrsta] == VRSTA_BURG) SCM(playerid,SIVA,"Usli ste u burg | Za listu jela kucajte /meni.");
else if(FI[i][fVrsta] == VRSTA_CLUCKIN) SCM(playerid,SIVA,"Usli ste u Cluckin' Bell | Za listu jela kucajte /meni.");
else if(FI[i][fVrsta] == VRSTA_PIZZA) SCM(playerid,SIVA,"Usli ste u piceriju | Za listu jela kucajte /meni.");
else if(FI[i][fVrsta] == VRSTA_DISCO) SCM(playerid,SIVA,"Usli ste u disco | Za listu pica kucajte /pice.");
else if(FI[i][fVrsta] == VRSTA_BAR) SCM(playerid,SIVA,"Usli ste u bar | Za listu pica kucajte /pice.");
else if(FI[i][fVrsta] == VRSTA_PIGPEN) SCM(playerid,SIVA,"Usli ste u pig pen | Za listu pica kucajte /pice.");
else if(FI[i][fVrsta] == VRSTA_GYM) SCM(playerid,SIVA,"Usli ste u teretanu | Da pogledate treninge kucajte /fightstyle.");
else if(FI[i][fVrsta] == VRSTA_BARBER) SCM(playerid,SIVA,"Usli ste u frizerski salon | Da se osisate kucajte /frizura.");
else if(FI[i][fVrsta] == VRSTA_ECBANKA)LoadObjects(playerid, 5);
else if(FI[i][fVrsta] == VRSTA_BINCO)
{
SCM(playerid,SIVA,"Dobrodosli u butik odjece binco.");
SCM(playerid,SIVA,"Da promenite skin kucajte /skin.");
SCM(playerid,SIVA,"Skin mozete menjati samo ako niste clan org.");
}
else if(FI[i][fVrsta] == VRSTA_VICTIM)
{
SCM(playerid,SIVA,"Dobrodosli u butik odjece victim.");
SCM(playerid,SIVA,"Da promenite skin kucajte /skin.");
SCM(playerid,SIVA,"Skin mozete menjati samo ako niste clan org.");
}
else if(FI[i][fVrsta] == VRSTA_SUBURBAN)
{
SCM(playerid,SIVA,"Dobrodosli u butik odjece suburban.");
SCM(playerid,SIVA,"Da promenite skin kucajte /skin.");
SCM(playerid,SIVA,"Skin mozete menjati samo ako niste clan org.");
}
else if(FI[i][fVrsta] == VRSTA_ZIP)
{
SCM(playerid,SIVA,"Dobrodosli u butik odjece zip.");
SCM(playerid,SIVA,"Da promenite skin kucajte /skin.");
SCM(playerid,SIVA,"Skin mozete menjati samo ako niste clan org.");
}
}
if(IsPlayerInRangeOfPoint(playerid, 3.0, FI[i][fIzlazX], FI[i][fIzlazY], FI[i][fIzlazZ])
&& GetPlayerVirtualWorld(playerid) == FI[i][fVW] && !IsPlayerInAnyVehicle(playerid))
{
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
JBC_SetPlayerPos(playerid, FI[i][fUlazX], FI[i][fUlazY], FI[i][fUlazZ]);
UsaoFirma[playerid] = -1;
}
}
}
if(newkeys & KEY_SPRINT)
{
if(BiraSkin[playerid] == true)
{
new i = UsaoFirma[playerid];
BiraSkin[playerid] = false;
SelectCharPlace[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SetPlayerSkin(playerid, PI[playerid][pChar]);
SetPlayerInterior(playerid, FI[i][fInt]);
SetPlayerVirtualWorld(playerid, FI[i][fVW]);
JBC_SetPlayerPos(playerid, FI[i][fIzlazX], FI[i][fIzlazY], FI[i][fIzlazZ]);
SetCameraBehindPlayer(playerid);
SCM(playerid,SIVA,"Odustali ste od odabira skina!");
}
}
if(newkeys & KEY_JUMP)
{
if(BiraSkin[playerid] == true)
{
new b = UsaoFirma[playerid];
if(GetPlayerSkin(playerid))
{
if(PI[playerid][pCash] > 35)
{
SetPlayerSkin(playerid, GetPlayerSkin(playerid));
PI[playerid][pChar] = GetPlayerSkin(playerid);
FirmaNovac(b, 35);
King_DajIgracuNovac(playerid, - 35);
FI[b][fProizvodi]--;
SacuvajFirmu(b);
BiraSkin[playerid] = false;
SelectCharPlace[playerid] = 0;
TogglePlayerControllable(playerid, 1);
SetPlayerInterior(playerid, FI[b][fInt]);
SetPlayerVirtualWorld(playerid, FI[b][fVW]);
JBC_SetPlayerPos(playerid, FI[b][fIzlazX], FI[b][fIzlazY], FI[b][fIzlazZ]);
SetCameraBehindPlayer(playerid);
SCM(playerid,-1,"Kupili ste skin za 35$");
}
else return SCM(playerid, SIVA, "Nemate dovoljno novca!");
}
}
}
stock FirmaNovac(firma, iznos)
{
if(iznos < 0 || iznos > 99999999) return 1;
FI[firma][fKasa] += iznos;
SacuvajFirmu(firma);
return 1;
}

stock FirmaLabelIPickup(idfirme)
{
new string[256];
if(FI[idfirme][fImaVlasnika] == 0)
{
DestroyDynamicPickup(FirmaPickup[idfirme]);
UpdateDynamic3DTextLabelText(FirmaLabel[idfirme], 0x80FF80FF, string);
format(string,sizeof(string),"[ %s ]\nFirma na prodaju!\nCena: $%d\nLevel: %d\nZa kupovinu /kupifirmu",FI[idfirme][fNaziv],FI[idfirme][fCena],FI[idfirme][fLevel],idfirme);
FirmaLabel[idfirme] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,FI[idfirme][fUlazX], FI[idfirme][fUlazY], FI[idfirme][fUlazZ],15);
FirmaPickup[idfirme] = CreateDynamicPickup(1239, 1, FI[idfirme][fUlazX], FI[idfirme][fUlazY], FI[idfirme][fUlazZ]);
}
else if(FI[idfirme][fImaVlasnika] == 1)
{
DestroyDynamicPickup(FirmaPickup[idfirme]);
UpdateDynamic3DTextLabelText(FirmaLabel[idfirme], 0x80FF80FF, string);
format(string,sizeof(string),"{A7E7FF}[ %s ]\nVlasnik: %s\nLevel: %d\nIznuda: %s\nID: %d\nZa ulaz koristi 'F'",FI[idfirme][fNaziv],FI[idfirme][fVlasnik],FI[idfirme][fLevel],FI[idfirme][fIznuda],idfirme);
FirmaLabel[idfirme] = CreateDynamic3DTextLabel(string ,BELA,FI[idfirme][fUlazX], FI[idfirme][fUlazY], FI[idfirme][fUlazZ],15);
FirmaPickup[idfirme] = CreateDynamicPickup(19132, 1, FI[idfirme][fUlazX], FI[idfirme][fUlazY], FI[idfirme][fUlazZ]);
}
return 1;
}
FUNCTION: SacuvajFirmu(idfirme)
{
new dFile[128];
format(dFile, sizeof(dFile),"LSystems/firme/Firma_%d.ini",idfirme);
new INI:File = INI_Open(dFile);
INI_WriteInt(File,"ImaVlasnika",FI[idfirme][fImaVlasnika]);
INI_WriteString(File,"Vlasnik",FI[idfirme][fVlasnik]);
INI_WriteInt(File,"Vrsta",FI[idfirme][fVrsta]);
INI_WriteString(File,"Naziv",FI[idfirme][fNaziv]);
INI_WriteString(File,"Iznuda",FI[idfirme][fIznuda]);
INI_WriteFloat(File,"UlazX",FI[idfirme][fUlazX]);
INI_WriteFloat(File,"UlazY",FI[idfirme][fUlazY]);
INI_WriteFloat(File,"UlazZ",FI[idfirme][fUlazZ]);
INI_WriteFloat(File,"IzlazX",FI[idfirme][fIzlazX]);
INI_WriteFloat(File,"IzlazY",FI[idfirme][fIzlazY]);
INI_WriteFloat(File,"IzlazZ",FI[idfirme][fIzlazZ]);
INI_WriteInt(File,"Level",FI[idfirme][fLevel]);
INI_WriteInt(File,"Cena",FI[idfirme][fCena]);
INI_WriteInt(File,"Kasa",FI[idfirme][fKasa]);
INI_WriteInt(File,"Int",FI[idfirme][fInt]);
INI_WriteInt(File,"Zatvoreno",FI[idfirme][fZatvoreno]);
INI_WriteInt(File,"Proizvodi",FI[idfirme][fProizvodi]);
INI_WriteInt(File,"MaxProizvodi",FI[idfirme][fMaxProizvodi]);
INI_WriteInt(File,"VW",FI[idfirme][fVW]);
INI_WriteInt(File,"Postavljena",FI[idfirme][fPostavljena]);
INI_Close(File);
return 1;
}

FUNCTION: UcitajFirme(idfirme, name[], value[])
{
INI_Int("ImaVlasnika",FI[idfirme][fImaVlasnika]);
INI_String("Vlasnik",FI[idfirme][fVlasnik],32);
INI_Int("Vrsta",FI[idfirme][fVrsta]);
INI_String("Naziv",FI[idfirme][fNaziv],64);
INI_String("Iznuda",FI[idfirme][fIznuda],64);
INI_Float("UlazX",FI[idfirme][fUlazX]);
INI_Float("UlazY",FI[idfirme][fUlazY]);
INI_Float("UlazZ",FI[idfirme][fUlazZ]);
INI_Float("IzlazX",FI[idfirme][fIzlazX]);
INI_Float("IzlazY",FI[idfirme][fIzlazY]);
INI_Float("IzlazZ",FI[idfirme][fIzlazZ]);
INI_Int("Level",FI[idfirme][fLevel]);
INI_Int("Cena",FI[idfirme][fCena]);
INI_Int("Kasa",FI[idfirme][fKasa]);
INI_Int("Int",FI[idfirme][fInt]);
INI_Int("Zatvoreno",FI[idfirme][fZatvoreno]);
INI_Int("Proizvodi",FI[idfirme][fProizvodi]);
INI_Int("MaxProizvodi",FI[idfirme][fMaxProizvodi]);
INI_Int("VW",FI[idfirme][fVW]);
INI_Int("Postavljena",FI[idfirme][fPostavljena]);
return 1;
}
Reply
#2

Any Body to help ?
Reply
#3

There's something called 'Callback'. You need to add the parts are for some specific callbacks into them.

https://sampwiki.blast.hk/wiki/Category:Scripting_Callbacks

For example:
- You have dialogid (it must be inside OnDialogResponse).
- You have newkeys (it must be inside OnPlayerKeyStateChange).

The first part should be in OnFilterScriptInit (I guess you want to load them).
Reply
#4

(104) : error 001: expected token: "-identifier-", but found "="
(105) : error 029: invalid expression, assumed zero
(107) : error 029: invalid expression, assumed zero
(107) : error 029: invalid expression, assumed zero
(10 : error 001: expected token: ";", but found "if"
(10 : fatal error 107: too many error messages on one line

Code:104 for(new b = 0; b < sizeof (FI); b++)
Code:105 format gFile[35];
Code:106 {
Code:107 format(gFile, 50, "LSystems/firme/Firma_%d.ini" ,b)
Code:108 if(fexist(gFile))


Now i have this errors :@@ (
Reply
#5

pawn Код:
format(gFile, 50, "LSystems/firme/Firma_%d.ini" ,b); // <-- it was missing a semicolor ;
Replace:
pawn Код:
format gFile[35];
with
pawn Код:
new gFile[50]; // new is to declare a new variable, not format. Plus, you were trying to declare a string with size of 35 and then using size 50 in the format. Change to 50 to avoid problems in the future (long message lol)
and show us few lines before 104.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)