Kreiranje firmi,kuca,stanova,vikendica..

Započeo Daksy, Jun 27, 2018, 18:51:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Problem(error/warning):Kada ocu da kreiram firmu,vikendicu.... moram da ukucam ID koji zelim da bude, u modu je definisamo MAX_FIRMI 300, ako promenim taj max firmi automatski ce se u scriptfiles/firme kreirati prazni fajlovi sa tim ID-evima, ne znam kako da resim...
Dio skripte:
#define FIRMA_FILE    "Firme/%d.ini"
#define MAX_FIRMI 300
enum Firme
{
	fImaVlasnika,
	fVlasnik[MAX_PLAYER_NAME],
	fVrsta,
	fNaziv[64],
	fIznuda[64],
	Float:fUlazX,
	Float:fUlazY,
	Float:fUlazZ,
	Float:fIzlazX,
	Float:fIzlazY,
	Float:fIzlazZ,
	fLevel,
	fCena,
	fKasa,
	fInt,
	fZatvoreno,
	fProizvodi,
	fMaxProizvodi,
	fVW
};
new FirmaInfo[MAX_FIRMI][Firme];
new UsaoFirma[MAX_PLAYERS];
new FirmaPickup[sizeof(FirmaInfo)];
new Text3D:FirmaLabel[sizeof(FirmaInfo)];



YCMD:napravifirmu(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"ERROR:"BELA" Moras se ulogovati kako bi koristio ovu komandu!");
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""BELA""CRVENA"ERROR:"BELA" Nisi ovlascen!");
	if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"{0D97E6}"CRVENA"ERROR: "BELA"Morate biti na admin duznosti!");
    new firmaid,vrsta,cena,lvl,ffirma[80],string[512]; GetPlayerPos(playerid, X,Y,Z);
    if(sscanf(params, "iiii", firmaid,vrsta, lvl , cena))
	{
    	SCM(playerid, -1, "{D4D4D4}COMMAND:{FFFFFF} "BELA"/napravifirmu [id] [vrsta] [level] [cena]");
    	SCM(playerid, -1, "Vrste Firmi | "BELA"0: Market | 1: Market | 2: Burg");
        SCM(playerid, -1, "Vrste Firmi | "BELA"3: Cluckin Bell | 4: Pizza | 5: Pig Pen");
        SCM(playerid, -1, "Vrste Firmi | "BELA"6: Bar | 7: Gym | 8: Sex Shop | 9: Binco");
        SCM(playerid, -1, "Vrste Firmi | "BELA"10: Gun Shop | 11: Disco | 12: Restoran");
        SCM(playerid, -1, "Vrste Firmi | "BELA"13: Zip | 14: Victim | 15: Suburban");
        SCM(playerid, -1, "Vrste Firmi | "BELA"16: Night Club | 17: Elite Restoran | 18: Gun Shop 2");
        SCM(playerid, -1, "Vrste Firmi | "BELA"19: Barber | 20: Kladionica | 21: S biznis");
    	return 1;
	}
	if(firmaid >= MAX_FIRMI) return SCM(playerid,-1,"Max firmi je prekoracen, probajte drugi ID");
	format(ffirma, sizeof(ffirma), FIRMA_FILE, firmaid);
	if(fexist(ffirma)) return SCM(playerid,-1, ""CRVENA"ERROR:"BELA" ID te firme vec postoji!");
	if(vrsta == 0) // MARKET 1
	{
        FirmaInfo[firmaid][fIzlazX] = -25.132600; FirmaInfo[firmaid][fIzlazY] = -139.067001;
    	FirmaInfo[firmaid][fIzlazZ] = 1003.546875; FirmaInfo[firmaid][fInt] = 16;
    	FirmaInfo[firmaid][fCena] = cena; FirmaInfo[firmaid][fLevel] = lvl;
    	FirmaInfo[firmaid][fVrsta] = VRSTA_MARKET;
    	strmid(FirmaInfo[firmaid][fNaziv],"Market 24/7",0,strlen("Market 24/7"),255);
    	strmid(FirmaInfo[firmaid][fIznuda],"Niko",0,strlen("Niko"),255);
	}
	else if(vrsta == 1) // MARKET 2
	{
        FirmaInfo[firmaid][fIzlazX] = -27.312299; FirmaInfo[firmaid][fIzlazY] = -29.277599;
    	FirmaInfo[firmaid][fIzlazZ] = 1003.557250; FirmaInfo[firmaid][fInt] = 4;
    	FirmaInfo[firmaid][fCena] = cena; FirmaInfo[firmaid][fLevel] = lvl;
    	FirmaInfo[firmaid][fVrsta] = VRSTA_MARKET;
    	strmid(FirmaInfo[firmaid][fNaziv],"Market 24/7",0,strlen("Market 24/7"),255);
    	strmid(FirmaInfo[firmaid][fIznuda],"Niko",0,strlen("Niko"),255);
	}
	else if(vrsta == 2) // BURG
	{
        FirmaInfo[firmaid][fIzlazX] = 366.032409; FirmaInfo[firmaid][fIzlazY] = -72.639999;
    	FirmaInfo[firmaid][fIzlazZ] = 1001.507812; FirmaInfo[firmaid][fInt] = 10;
    	FirmaInfo[firmaid][fCena] = cena; FirmaInfo[firmaid][fLevel] = lvl;
    	FirmaInfo[firmaid][fVrsta] = VRSTA_BURG;
    	strmid(FirmaInfo[firmaid][fNaziv],"Burg",0,strlen("Burg"),255);
    	strmid(FirmaInfo[firmaid][fIznuda],"Niko",0,strlen("Niko"),255);
   	}
	//preskocio sam ovolike vrste firmi dzaba da ne bude dugacko
	else if(vrsta == 21) // S biznisi
	{
	    FirmaInfo[firmaid][fIzlazX] = 0.0; FirmaInfo[firmaid][fIzlazY] = 0.0;
    	FirmaInfo[firmaid][fIzlazZ] = 0.0; FirmaInfo[firmaid][fInt] = 0;
    	FirmaInfo[firmaid][fCena] = cena; FirmaInfo[firmaid][fLevel] = lvl;
    	FirmaInfo[firmaid][fVrsta] = VRSTA_SBIZZ;
    	strmid(FirmaInfo[firmaid][fNaziv],"Preimenovati",0,strlen("Preimenovati"),255);
    	strmid(FirmaInfo[firmaid][fIznuda],"Niko",0,strlen("Niko"),255);
	}
    FirmaInfo[firmaid][fUlazX] = X; FirmaInfo[firmaid][fUlazY] = Y; FirmaInfo[firmaid][fUlazZ] = Z;
    FirmaInfo[firmaid][fImaVlasnika] = 0; FirmaInfo[firmaid][fZatvoreno] = 1;
    FirmaInfo[firmaid][fVW] = firmaid; FirmaInfo[firmaid][fKasa] = 0;
    FirmaInfo[firmaid][fProizvodi] = 300; FirmaInfo[firmaid][fMaxProizvodi] = 300;
    strmid(FirmaInfo[firmaid][fVlasnik],"Niko",0,strlen("Niko"),255);
    format(string,sizeof(string),"{0BC70E}[ "BELA"%s {0BC70E}]\n{0BC70E}Firma na prodaju!\n{0BC70E}Cena: "BELA"%d$\n{0BC70E}Level: "BELA"%d\n{0BC70E}Za kupovinu /kupifirmu",FirmaInfo[firmaid][fNaziv],FirmaInfo[firmaid][fCena],FirmaInfo[firmaid][fLevel]);
    FirmaLabel[firmaid] = Create3DTextLabel(string ,0x33CCFFAA,X,Y,Z,3, 0, 1);
    FirmaPickup[firmaid] = CreateDynamicPickup(1274, 1, FirmaInfo[firmaid][fUlazX], FirmaInfo[firmaid][fUlazY], FirmaInfo[firmaid][fUlazZ]);
    format(string,sizeof(string),"{0D97E6}(ZG)"BELA" Firma Kreiran (Ovo je firma ID: %d)!",firmaid);
	SCM(playerid,-1,string);
	FirmaLabelIPickup(firmaid); SacuvajFirmu(firmaid);
	return 1;
}

Slika/video ingame problema(obavezno ako je ingame problem): https://imgur.com/a/bqaPpuQ

Ista situacija je i za kuce,vikendice, sve sve..

Negdje cuvas fajl koji ne trebas i automatski time kreiras prazan fajl. Trazi SacuvajFirmu gdje sve koristis.


bilo je lijepo dok je trajalo.



@Bašovski

Mozes li da mi to resis molim te, imas gore u reply-u link .pwn fajla

Ne pada mi na pamet da to skidam. Stavi ovdje.


bilo je lijepo dok je trajalo.


public OnGameModeExit()
{
	foreach(Player, i)
	{
		KillTimer(freeze[i]);
		KillTimer(utovar[i]);
		KillTimer(zavrsenaposta[i]);
		KillTimer(KapijeTimer[i]);
		SavePlayer(i);
	}
	for(new b = 0; b < sizeof(FirmaInfo); b++) { SacuvajFirmu(b); }
	for(new k = 0; k < sizeof(KucaInfo); k++) { SacuvajKucu(k); }
	for(new s = 0; s < sizeof(StanInfo); s++) { SacuvajStan(s); }
	for(new vi = 0; vi < sizeof(VikendiceInfo); vi++) { SacuvajVikendicu(vi); }
	for(new ba = 0; ba < sizeof(AtmInfo); ba++) { SacuvajATM(ba); }
 	for(new i; i < MAX_AUTA; i++) { DestroyVehicle(VoziloInfo[i][vID]); }
 	for(new i; i < MAX_MOTORA; i++) { DestroyVehicle(MotorInfo[i][mID]); }
 	for(new i; i < MAX_BICIKALA; i++) { DestroyVehicle(BiciklaInfo[i][biID]); }
 	for(new i; i < MAX_AVIONA; i++) { DestroyVehicle(AvionInfo[i][avID]); }
 	for(new i; i < MAX_PLOVILA; i++) { DestroyVehicle(PlovilaInfo[i][plID]); }
	//Destroy Textdrawowe
	TextDrawDestroy(Intro[0]); TextDrawDestroy(Intro[1]); TextDrawDestroy(Intro[2]);
	TextDrawDestroy(Intro[3]); TextDrawDestroy(Intro[4]); TextDrawDestroy(Intro[5]);
	TextDrawDestroy(Intro[6]); TextDrawDestroy(Intro[7]); TextDrawDestroy(Intro[8]);
	TextDrawDestroy(Intro[9]); TextDrawDestroy(Intro[10]); TextDrawDestroy(Intro[11]);
    TextDrawDestroy(Intro[12]); TextDrawDestroy(Intro[13]); TextDrawDestroy(TutorialSledi[0]);
	TextDrawDestroy(TutorialSledi[1]); TextDrawDestroy(TutorialSledi[2]); TextDrawDestroy(TutorialSledi[3]);
	TextDrawDestroy(TutorialSledi[4]); TextDrawDestroy(TutorialSledi[5]); TextDrawDestroy(TutorialSledi[6]);
	TextDrawDestroy(TDO[0]); TextDrawDestroy(TDO[1]); TextDrawDestroy(TDO[2]);
	TextDrawDestroy(TDO[3]); TextDrawDestroy(TDO[4]); TextDrawDestroy(TDO[5]);
	TextDrawDestroy(TDO[6]); TextDrawDestroy(SPORUKE[3]); TextDrawDestroy(SPORUKE[2]);
	TextDrawDestroy(SPORUKE[0]); TextDrawDestroy(SPORUKE[1]);
	//Kill timere
	KillTimer(sporuke); KillTimer(sprovera); KillTimer(bankaupdate); KillTimer(spremikorisnike);
	KillTimer(wlprovera); KillTimer(odbrojavanje); KillTimer(paypoeni); KillTimer(tgorivo);
	KillTimer(antiafk);
	return 1;
}

YCMD:efirmu(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"ERROR:"BELA" Moras se ulogovati kako bi koristio ovu komandu!");
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""BELA""CRVENA"ERROR:"BELA" Nisi ovlascen!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"{0D97E6}"CRVENA"ERROR: "BELA"Morate biti na admin duznosti!");
	new i = -1;
	for(new x; x < MAX_FIRMI; x++)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, FirmaInfo[x][fUlazX], FirmaInfo[x][fUlazY], FirmaInfo[x][fUlazZ]))
		{
			i = x;
			IzmenaFirme[playerid] = x;
			break;
		}
	}
	if(i == -1) return SCM(playerid, -1, ""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"Niste kod firme!");
	new akcija[16];
	if(sscanf(params, "s[16]", akcija))
    {
		SCM(playerid,-1,"Firme | "BELA"/efirmu | Prodaj | Otkljucaj");
		SCM(playerid,-1,"Firme | "BELA"/efirma2 za editovanje ostalog!");
		return 1;
	}
	if(!strcmp(akcija, "prodaj", true))
	{
		if(FirmaInfo[i][fImaVlasnika] == 0) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"Ne mozete prodati firmu jer ta firma nema vlasnika!");
		FirmaInfo[i][fImaVlasnika] = 0;
		FirmaInfo[i][fKasa] = 0;
		FirmaInfo[i][fZatvoreno] = 1;
		strmid(FirmaInfo[i][fVlasnik], "Niko", 0, strlen("Niko"), 255);
		strmid(FirmaInfo[i][fIznuda], "Niko", 0, strlen("Niko"), 255);
		PlayerInfo[playerid][pPosedovanjeFirme] = -1;
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Prodali ste firmu ID: %d!", i);
		IzmenaFirme[playerid] = -1;
	}
	else if(!strcmp(akcija, "info", true))
	{
		new z[3];
	   	if(FirmaInfo[i][fZatvoreno] == 1) z = "Da";
	    else z = "Ne";
	    SCMF(playerid,-1,"- Vlasnik: %s | Reket: %s | Naziv: %s | Level: %d | Zakljucano: %s", FirmaInfo[i][fVlasnik], FirmaInfo[i][fIznuda],FirmaInfo[i][fNaziv],FirmaInfo[i][fLevel],z);
 	    SCMF(playerid,-1,"- Cena: %d$ | ID: %d | Kasa: %d$ | Proizvodi: %d/%d", FirmaInfo[i][fCena], i, FirmaInfo[i][fKasa], FirmaInfo[i][fProizvodi], FirmaInfo[i][fMaxProizvodi]);
		IzmenaFirme[playerid] = -1;
	}
	else if(!strcmp(akcija, "otkljucaj", true))
	{
		FirmaInfo[i][fZatvoreno] = 0;
		SCM(playerid,-1,""BELA"Firma je otkljucana!");
	}
	else return SCM(playerid, -1, ""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"Netacno uneseno radnja editovanja!");
	return 1;
}
///////////////////////////////////////////////////////////////
YCMD:efirmu2(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"ERROR:"BELA" Moras se ulogovati kako bi koristio ovu komandu!");
	if(PlayerInfo[playerid][pAdmin] < 6) return SCM(playerid,-1,""BELA""CRVENA"ERROR:"BELA" Nisi ovlascen!");
    if(AdminDuty[playerid] == 0) return SCM(playerid,-1,""CRVENA"{0D97E6}"CRVENA"ERROR: "BELA"Morate biti na admin duznosti!");
	new i = -1;
	for(new x; x < MAX_FIRMI; x++)
	{
	    if(IsPlayerInRangeOfPoint(playerid, 3.0, FirmaInfo[x][fUlazX], FirmaInfo[x][fUlazY], FirmaInfo[x][fUlazZ]))
		{
			i = x;
			IzmenaFirme[playerid] = x;
			break;
		}
	}
	if(i == -1) return SCM(playerid, -1, ""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"Niste kod firme!");
	new akcija[16],radnja;
	if(sscanf(params, "s[16]d", akcija,radnja))
    {
		SCM(playerid,-1,"Firme | "BELA"/efirmu2 | Level | Cena | Reket ID: 0 | Kasa | Proizvodi");
		SCM(playerid,-1,"Firme | "BELA"/efirma za editovanje ostalog!");
		return 1;
	}
	if(!strcmp(akcija, "level", true))
	{
        FirmaInfo[IzmenaFirme[playerid]][fLevel] = radnja;
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Izmenili ste level firme id: %d u %d!", i, radnja);
		IzmenaFirme[playerid] = -1;
	}
	else if(!strcmp(akcija, "cena", true))
	{
        FirmaInfo[IzmenaFirme[playerid]][fCena] = radnja;
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Izmenili ste cenu firme id: %d u %d!", i, radnja);
		IzmenaFirme[playerid] = -1;
	}
	else if(!strcmp(akcija, "reket", true))
	{
    	if(radnja == 0)
    	{
        strmid(FirmaInfo[IzmenaFirme[playerid]][fIznuda], "Niko", 0, strlen("Niko"), 255);
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Skinuli ste reket firme id %d!", i);
		IzmenaFirme[playerid] = -1;
		}
	}
	else if(!strcmp(akcija, "kasa", true))
	{
        FirmaInfo[IzmenaFirme[playerid]][fKasa] = radnja;
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Izmenili ste kasu firme id: %d u %d!", i, radnja);
		IzmenaFirme[playerid] = -1;
	}
	else if(!strcmp(akcija, "proizvodi", true))
	{
        FirmaInfo[IzmenaFirme[playerid]][fProizvodi] = radnja;
		FirmaLabelIPickup(i);
		SacuvajFirmu(i);
		SCMF(playerid, -1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Izmenili ste proizvode firme id: %d u %d!", i, radnja);
		IzmenaFirme[playerid] = -1;
	}
	else return SCM(playerid, -1, ""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"Netacno uneseno radnja editovanja!");
	return 1;
}
/////////////////////////////////////////////////////////////
YCMD:kupifirmu(playerid, params[], help)
{
    #pragma unused help
    if(UlogovanProvera[playerid] == 0) return SCM(playerid,-1,""CRVENA"ERROR:"BELA" Moras se ulogovati kako bi koristio ovu komandu!");
	for(new i; i < sizeof(FirmaInfo); i++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 3.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ]))
		{
			if(!strcmp(FirmaInfo[i][fVlasnik], "Niko", true) && FirmaInfo[i][fImaVlasnika] == 0)
			{
				if(PlayerInfo[playerid][pLevel] < FirmaInfo[i][fLevel]) return SCMF(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Treba vam %d level za ovu firmu!", FirmaInfo[i][fLevel]);
				if(PlayerInfo[playerid][pPosedovanjeFirme] != -1) return SCM(playerid,-1, ""CRVENA"ERROR:{FFFFFF} Vec imas firmu!!");
				if(PlayerInfo[playerid][pNovacDzep] < FirmaInfo[i][fCena]) return SCM(playerid,-1, ""CRVENA"ERROR:{FFFFFF}Nemas dovoljno novca za ovo firmu!");
				strmid(FirmaInfo[i][fVlasnik], GetName(playerid), 0, strlen(GetName(playerid)), 255);
				FirmaInfo[i][fImaVlasnika] = 1;
				PlayerInfo[playerid][pPosedovanjeFirme] = i;
				FirmaInfo[i][fZatvoreno] = 0;
				SCM(playerid,-1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Cestitamo, kupili ste firmu!");
				SCM(playerid,-1, ""BELA"{0D97E6}(ZG){FFFFFF} "BELA"Za komande firme koristite /firma!");
				g_NovacMinus(playerid, FirmaInfo[i][fCena]);
				strmid(FirmaInfo[i][fIznuda],"Niko",0,strlen("Niko"),255);
				UsaoFirma[playerid] = i;
				FirmaLabelIPickup(i);
				SacuvajFirmu(i);
				SavePlayer(playerid);
				return 1;
			}
			else return SCM(playerid, -1, ""CRVENA"ERROR: "BELA"Ta firma nije na prodaju.");
		}
	}
	return 1;
}
////////////////////////////////////////////////////////////
if(newkeys & KEY_JUMP)
	{
		if(BiraSkin[playerid] == true)
		{
			new b = UsaoFirma[playerid];
			if(GetPlayerSkin(playerid))
			{
				if(PlayerInfo[playerid][pNovacDzep] > 250)
				{
					SetPlayerSkin(playerid, GetPlayerSkin(playerid));
					PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
				    FirmaNovac(b, 250); g_NovacMinus(playerid, 250);
				    FirmaInfo[b][fProizvodi]--; SacuvajFirmu(b);
					BiraSkin[playerid] = false; SelectCharPlace[playerid] = 0;
					TogglePlayerControllable(playerid, 1);
					SetPlayerInterior(playerid, FirmaInfo[b][fInt]);
					SetPlayerVirtualWorld(playerid, FirmaInfo[b][fVW]);
				    SetPlayerPos(playerid, FirmaInfo[b][fIzlazX], FirmaInfo[b][fIzlazY], FirmaInfo[b][fIzlazZ]);
					SetCameraBehindPlayer(playerid); GameTextForPlayer(playerid,"~w~Kupili ste novo odelo za ~g~250$!",5000,3);
					TextDrawHideForPlayer(playerid,TDO[0]); TextDrawHideForPlayer(playerid,TDO[1]);
					TextDrawHideForPlayer(playerid,TDO[2]); TextDrawHideForPlayer(playerid,TDO[3]);
					TextDrawHideForPlayer(playerid,TDO[4]); TextDrawHideForPlayer(playerid,TDO[5]);
					TextDrawHideForPlayer(playerid,TDO[6]); SavePlayer(playerid);
				}
				else return SCM(playerid, -1, ""CRVENA"ERROR: "BELA"Nemate dovoljno novca 250$!");
			}
		}
	}

if(dialogid == DIALOG_FIRMA && response)
	{
		if(!response) return 1;
		if(response)
		{
			if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
			new i = PlayerInfo[playerid][pPosedovanjeFirme];
			switch(listitem)
			{
				case 0:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
					    if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
						new string1[275], string2[275], string[550],z[3]; if(FirmaInfo[i][fZatvoreno] == 1) z = "Da"; else z = "Ne";
						format(string1,sizeof(string1),""BELA"_______________________________________\n\n"TPLAVA"Vlasnik Firme: "CRVENA"%s\n"TPLAVA"Naziv Firme: "CRVENA"%s\n"TPLAVA"Reket: "CRVENA"%s\n"TPLAVA"Level: "BELA"%d\n"TPLAVA"Cena: "BELA"%d\n",FirmaInfo[i][fVlasnik],FirmaInfo[i][fNaziv],FirmaInfo[i][fIznuda],FirmaInfo[i][fLevel],FirmaInfo[i][fCena]);
						format(string2,sizeof(string2),""TPLAVA"ID: "BELA"%d\n"TPLAVA"Zatvoreno: "BELA"%s\n"TPLAVA"Kasa: "BELA"%d$\n"TPLAVA"Proizvodi: "BELA"%d/%d\n_______________________________________",i,z,FirmaInfo[i][fKasa],FirmaInfo[i][fProizvodi],FirmaInfo[i][fMaxProizvodi]);
					    format(string, sizeof(string), "%s%s", string1, string2);
					    SPD(playerid, DIALOG_FINFO, DIALOG_STYLE_MSGBOX, ""BELA"Firma Informacije", string, "Ok", "Izlaz");
					}
					else
					{
						if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						new string1[275], string2[275], string[550],z[3]; if(FirmaInfo[i][fZatvoreno] == 1) z = "Da"; else z = "Ne";
						format(string1,sizeof(string1),""BELA"_______________________________________\n\n"TPLAVA"Vlasnik Firme: "CRVENA"%s\n"TPLAVA"Naziv Firme: "CRVENA"%s\n"TPLAVA"Reket: "CRVENA"%s\n"TPLAVA"Level: "BELA"%d\n"TPLAVA"Cena: "BELA"%d\n",FirmaInfo[i][fVlasnik],FirmaInfo[i][fNaziv],FirmaInfo[i][fIznuda],FirmaInfo[i][fLevel],FirmaInfo[i][fCena]);
						format(string2,sizeof(string2),""TPLAVA"ID: "BELA"%d\n"TPLAVA"Zatvoreno: "BELA"%s\n"TPLAVA"Kasa: "BELA"%d$\n"TPLAVA"Proizvodi: "BELA"%d/%d\n_______________________________________",i,z,FirmaInfo[i][fKasa],FirmaInfo[i][fProizvodi],FirmaInfo[i][fMaxProizvodi]);
					    format(string, sizeof(string), "%s%s", string1, string2);
					    SPD(playerid, DIALOG_FINFO, DIALOG_STYLE_MSGBOX, ""BELA"Firma Informacije", string, "Ok", "Izlaz");
					}
				}
				case 1:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
						if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
	                    if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
						if(FirmaInfo[i][fZatvoreno] == 0) return SCM(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Vec je otkljucana!");
						FirmaInfo[i][fZatvoreno] = 0;
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Firma otkljucana!");
						SacuvajFirmu(i);
					}
					else
					{
						if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
	                    if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						if(FirmaInfo[i][fZatvoreno] == 0) return SCM(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Vec je otkljucana!");
						FirmaInfo[i][fZatvoreno] = 0;
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Firma otkljucana!");
						SacuvajFirmu(i);
					}
				}
				case 2:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
						if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
	                    if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
						if(FirmaInfo[i][fZatvoreno] == 1) return SCM(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Vec je zakljucana!");
						FirmaInfo[i][fZatvoreno] = 1;
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Firma zakljucana!");
						SacuvajFirmu(i);
					}
					else
					{
						if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
	                    if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						if(FirmaInfo[i][fZatvoreno] == 1) return SCM(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Vec je zakljucana!");
						FirmaInfo[i][fZatvoreno] = 1;
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Firma zakljucana!");
						SacuvajFirmu(i);
					}
				}
			    case 3:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
	                    if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
						new string[128];
						format(string,sizeof(string), ""BELA"Unesite kolicinu novca koji zelite da podignete\n"ZELENA"U kasi trenutno ima %d$!", FirmaInfo[i][fKasa]);
						SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, ""ZELENA"Dizanje novca iz Firme", string, "Podigni", "Izlaz");
					}
					else
					{
					    if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						new string[128];
						format(string,sizeof(string), ""BELA"Unesite kolicinu novca koji zelite da podignete\n"ZELENA"U kasi trenutno ima %d$!", FirmaInfo[i][fKasa]);
						SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, ""ZELENA"Dizanje novca iz Firme", string, "Podigni", "Izlaz");
					}
				}
				case 4:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
				        if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
						new string[128];
						format(string,sizeof(string), ""BELA"Upisite kolicinu novca koji zelite da ostavite u firmu\n"ZELENA"U kasi treutno ima %d$!", FirmaInfo[i][fKasa]);
						SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
				    }
				    else
				    {
					    if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						new string[128];
						format(string,sizeof(string), ""BELA"Upisite kolicinu novca koji zelite da ostavite u firmu\n"ZELENA"U kasi treutno ima %d$!", FirmaInfo[i][fKasa]);
						SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
					}
				}
				case 5:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ) return SCM(playerid,-1,""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"U vasoj firmi nisu potrebni proizvodi!");
				    if(FirmaInfo[i][fProizvodi] >= 200) return SCM(playerid,-1,""CRVENA"{0D97E6}(ZG){FFFFFF} "BELA"U vasoj firmi nisu potrebni proizvodi imate preko 200!");
				    SCM(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Narucili ste proizvode za vasu firmu, obavestili smo sve online dostavljace!");
					foreach(Player, iplayer)
					{
					    if(IsPlayerConnected(iplayer))
					    {
							if(PlayerInfo[iplayer][pPosao] == POSAO_DOSTAVLJAC)
							{
								SCMF(iplayer,-1,""HZELENA"Potrebni Proizvodi | "BELA"Firma: %s | Lokacija: %s | Vlasnik/Narucio: %s!",FirmaInfo[i][fNaziv],UlicaFirme(i), GetName(playerid));
							}
						}
					}
				}
				case 6:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
				        if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
				        SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, ""BELA"Firma Ime", ""BELA"Upisite novo ime firme\n"CRVENA"Zabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
				    }
				    else
				    {
						if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, ""BELA"Firma Ime", ""BELA"Upisite novo ime firme\n"CRVENA"Zabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
					}
				}
				case 7:
				{
					if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"ERROR:{FFFFFF}Nemate firmu!");
                    if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
					new cena1 = (FirmaInfo[i][fCena]/4)*2;
					new string[256];
					format(string,sizeof(string), ""BELA"Prodaja firme drzavi\n\n"TPLAVA"Dali ste sigurni da zelite da prodate firmu drzavi za %d$!\n\n"BELA"Ako ste sigurni kliknite na 'Prodaj' ako ne kliknite na 'Izlaz'", cena1);
					SPD(playerid, DFIRMA_PRODAJA, DIALOG_STYLE_MSGBOX, ""BELA"Prodaja firme drzavi", string, "Prodaj", "Izlaz");
				}
				case 8:
				{
				    if(FirmaInfo[i][fVrsta] == VRSTA_SBIZZ)
				    {
                    	if(!IsPlayerInRangeOfPoint(playerid, 5.0, FirmaInfo[i][fUlazX], FirmaInfo[i][fUlazY], FirmaInfo[i][fUlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste ispred vase firme!");
                    	strmid(FirmaInfo[i][fIznuda], "Niko", 0, strlen("Niko"), 255);
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Uklonili ste iznudu sa svoje firme!");
					    FirmaLabelIPickup(i); SacuvajFirmu(i);
					}
					else
					{
					    if(!IsPlayerInRangeOfPoint(playerid, 15.0, FirmaInfo[i][fIzlazX], FirmaInfo[i][fIzlazY], FirmaInfo[i][fIzlazZ])) return SCM(playerid,-1,""CRVENA"ERROR: "BELA"Niste u vasoj firmi!");
						strmid(FirmaInfo[i][fIznuda], "Niko", 0, strlen("Niko"), 255);
						SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Uklonili ste iznudu sa svoje firme!");
					    FirmaLabelIPickup(i); SacuvajFirmu(i);
				    }
				}
			}
		}
	}


if(dialogid == DFIRMA_PRODAJA)
	{
		if(!response) return 1;
	   	if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Nemate firmu!");
		new i = PlayerInfo[playerid][pPosedovanjeFirme];
		if(response)
		{
			new cena1 = (FirmaInfo[i][fCena]/4)*2;
		    g_NovacPlus(playerid,cena1);
			FirmaInfo[i][fImaVlasnika] = 0;
			FirmaInfo[i][fKasa] = 0;
			FirmaInfo[i][fZatvoreno] = 1;
			strmid(FirmaInfo[i][fIznuda],"Niko",0,strlen("Niko"),255);
			strmid(FirmaInfo[i][fVlasnik], "Niko", 0, strlen("Niko"), 255);
			PlayerInfo[playerid][pPosedovanjeFirme] = -1;
			SacuvajFirmu(i);
			FirmaLabelIPickup(i);
			SavePlayer(playerid);
			SCMF(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Prodali ste firmu za %d$!",cena1);
		}
	}

if(dialogid == DFIRMA_PODIZANJE)
	{
		if(!response) return 1;
	   	if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Nemate firmu!");
		new i = PlayerInfo[playerid][pPosedovanjeFirme];
		if(response)
		{
			new iznos,string[256];
			if(sscanf(inputtext, "i", iznos))
			{
				format(string,sizeof(string), ""CRVENA"Pogresan Iznos!\n"BELA"Unesite kolicinu novca koji zelite da podignete\n"ZELENA"U kasi trenutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, ""ZELENA"Dizanje novca iz Firme", string, "Podigni", "Izlaz");
				return 1;
			}
			if(iznos > FirmaInfo[i][fKasa])
			{
				SCM(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Nemate toliko novca u kasi!");
				format(string,sizeof(string), ""CRVENA"Nemate toliko novca u kasi!\n"BELA"Unesite kolicinu novca koji zelite da podignete\n"ZELENA"U kasi trenutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, ""ZELENA"Dizanje novca iz Firme", string, "Podigni", "Izlaz");
				return 1;
			}
			if(iznos < 1 || iznos > 1000000)
			{
				SCM(playerid,-1,""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Suma ne moze biti manja od 1$ i vec od 1000000$!");
				format(string,sizeof(string), ""CRVENA"Suma ne moze biti manja od 1$ i vec od 1000000$!\n"BELA"Unesite kolicinu novca koji zelite da podignete\n"ZELENA"U kasi trenutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_PODIZANJE, DIALOG_STYLE_INPUT, ""ZELENA"Dizanje novca iz Firme", string, "Podigni", "Izlaz");
				return 1;
			}
			FirmaInfo[i][fKasa] -= iznos;
			g_NovacPlus(playerid, iznos);
			SacuvajFirmu(i);
			SCMF(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Podigli ste %d$ novca iz firme!", iznos);
		}
	}

if(dialogid == DFIRMA_OSTAVLJANJE)
	{
		if(!response) return 1;
	    if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Nemate firmu!");
		new i = PlayerInfo[playerid][pPosedovanjeFirme];
		if(response)
		{
			new iznos,string[256];
			if(sscanf(inputtext, "i", iznos))
			{
				format(string,sizeof(string), ""BELA"Upisite kolicinu novca koji zelite da ostavite u firmu\n"ZELENA"U kasi treutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
				return 1;
			}
			if(iznos > PlayerInfo[playerid][pNovacDzep])
			{
				SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate toliko novca!");
				format(string,sizeof(string), ""CRVENA"Nemate toliko novca!\n"BELA"Upisite kolicinu novca koji zelite da ostavite u firmu\n"ZELENA"U kasi treutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
				return 1;
			}
			if(iznos < 1 || iznos > 1000000)
			{
				SCM(playerid,-1,""CRVENA"{0D97E6}(ZG) "BELA"Suma ne moze biti manja od 1$ i vec od 1000000$!");
				format(string,sizeof(string), ""CRVENA"Suma ne moze biti manja od 1$ i vec od 1000000$!\n"BELA"Upisite kolicinu novca koji zelite da ostavite u firmu\n"ZELENA"U kasi treutno ima %d$!", FirmaInfo[i][fKasa]);
				SPD(playerid, DFIRMA_OSTAVLJANJE, DIALOG_STYLE_INPUT, ""ZELENA"Ostavljanje novca u firmu", string, "Ostavi", "Izlaz");
				return 1;
			}
			FirmaInfo[i][fKasa] += iznos;
			g_NovacMinus(playerid, iznos);
		    SacuvajFirmu(i);
			SCMF(playerid,-1,""TPLAVA"(BIZNIS) "BELA"Ostavili ste %d$ novca u firmu!", iznos);
		}
	}

if(dialogid == DFIRMA_NAZIV)
	{
		if(!response) return 1;
		if(response)
		{
		    if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"("CRVENA"ERROR:"BELA") "BELA"Nemate firmu!");
			new i = PlayerInfo[playerid][pPosedovanjeFirme];
			new imeq[35];
			if(sscanf(inputtext, "s[35]", imeq)) return SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, ""BELA"Firma Ime", ""BELA"Upisite novo ime firme\n"CRVENA"Zabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
			if(strlen(imeq) > 35)
			{
				SCM(playerid,-1,""CRVENA"{0D97E6}(ZG) "BELA"Ime firme ne moze sadrzavati vise od 35 znakova!");
				SPD(playerid, DFIRMA_NAZIV, DIALOG_STYLE_INPUT, ""BELA"Firma Ime", ""CRVENA"Ime firme je predugacno!\n"BELA"Upisite novo ime firme\n"CRVENA"Zabranjeno je stavljati OOC ime firme!", "Promeni", "Izlaz");
				return 1;
			}
			if(strfind(imeq, "|") != -1) return SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Koriscenje znakova u imenu firme je zabranjeno!");
			strmid(FirmaInfo[i][fNaziv], imeq, 0, strlen(imeq), 255);
			SCMF(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Postavili ste ime firme na '%s'!", imeq);
			FirmaLabelIPickup(i);
			SacuvajFirmu(i);
		}
	}

if(dialogid == DFIRMA_IZNUDA)
	{
		if(!response) return 1;
		if(PlayerInfo[playerid][pPosedovanjeFirme] == -1) return SCM(playerid,-1, ""CRVENA"{0D97E6}(ZG) "BELA"Nemate firmu!");
		new i = PlayerInfo[playerid][pPosedovanjeFirme];
		switch(listitem)
		{
			case 0:
			{
				strmid(FirmaInfo[i][fIznuda], "Mara Salvatrucha 13", 0, strlen("Mara Salvatrucha 13"), 255);
				SCM(playerid,-1, ""TPLAVA"(BIZNIS) "BELA"Iznudu firme ste postavili Mara Salvatrucha 13 Mafiji.");
				FirmaLabelIPickup(i); SacuvajFirmu(i);
			}
		}
	}

stock SacuvajFirmu(idfirme)
{
	new dFile[128];
	format(dFile, sizeof(dFile), FIRMA_FILE, idfirme);
	new INI:File = INI_Open(dFile);
	INI_WriteInt(File,"ImaVlasnika",FirmaInfo[idfirme][fImaVlasnika]);
	INI_WriteString(File,"Vlasnik",FirmaInfo[idfirme][fVlasnik]);
	INI_WriteInt(File,"Vrsta",FirmaInfo[idfirme][fVrsta]);
	INI_WriteString(File,"Naziv",FirmaInfo[idfirme][fNaziv]);
	INI_WriteString(File,"Iznuda",FirmaInfo[idfirme][fIznuda]);
	INI_WriteFloat(File,"UlazX",FirmaInfo[idfirme][fUlazX]);
	INI_WriteFloat(File,"UlazY",FirmaInfo[idfirme][fUlazY]);
	INI_WriteFloat(File,"UlazZ",FirmaInfo[idfirme][fUlazZ]);
	INI_WriteFloat(File,"IzlazX",FirmaInfo[idfirme][fIzlazX]);
	INI_WriteFloat(File,"IzlazY",FirmaInfo[idfirme][fIzlazY]);
	INI_WriteFloat(File,"IzlazZ",FirmaInfo[idfirme][fIzlazZ]);
	INI_WriteInt(File,"Level",FirmaInfo[idfirme][fLevel]);
	INI_WriteInt(File,"Cena",FirmaInfo[idfirme][fCena]);
	INI_WriteInt(File,"Kasa",FirmaInfo[idfirme][fKasa]);
	INI_WriteInt(File,"Int",FirmaInfo[idfirme][fInt]);
	INI_WriteInt(File,"Zatvoreno",FirmaInfo[idfirme][fZatvoreno]);
	INI_WriteInt(File,"Proizvodi",FirmaInfo[idfirme][fProizvodi]);
	INI_WriteInt(File,"MaxProizvodi",FirmaInfo[idfirme][fMaxProizvodi]);
	INI_WriteInt(File,"VW",FirmaInfo[idfirme][fVW]);
	INI_Close(File);
	return 1;
}

stock FirmaNovac(firma, iznos)
{
	if(iznos < 0 || iznos > 99999999) return 1;
	FirmaInfo[firma][fKasa] += iznos;
	if(!strcmp(FirmaInfo[firma][fIznuda], "Mexican Mafia")) { OrgInfo[RdtNovac] += 20; SacuvajOrgInfo(); }
    SacuvajFirmu(firma);
	return 1;
}



eto sefe u ovome imas SacuvajFirmu

new stringic[ 32 ];
for( new i; i < MAX_FIRMA; i++ ) {
    format( stringic, sizeof strigic, "Firme/%d.ini", i );
    if( fexist( stringic ) ) SacuvajFirmu( i );
}


Podesi ovaj string samo sa odgovarajucim directoryem...


bilo je lijepo dok je trajalo.