Detaljan opis problema:Kad kupim garazu ok kad prodam ostane garaza u -2314 i igrac dobije te pare umesto da oduzme igracu pare kad kupi garazu pogledaj te i slike i evo i komande kupi/prodaj...I nece da mi se sacuvaju garaze kad ih kreiram napravio sam i ini i txt folder i ubacio u skript files posle restarta sve prazno iz foldere garaza.txt ili garaza.ini
PS😮vaj sistem koristim http://pastebin.com/RRAVNwC5 i ovo nisam dodao ako se ne varam da je problem CODE 1
U kom delu skripte trebam da dodam?
Dio skripte:
KUPI
CMD:kupigarazu(playerid, params[])
{
for(new i=0; i < garageCount+1; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo, gInfo, gInfo))
{
if(gInfo == 1) return SendClientMessage(playerid, COLOR_ERROR,"Error: Ova garaza je vec kupljena.");
if(GetPlayerMoney(playerid) < gInfo) return SendClientMessage(playerid,COLOR_ERROR,"Error: Nemate dovoljno novca da kupite ovu garazu.");
GivePlayerMoney(playerid,-gInfo);
gInfo-= random(5000); //Take some money off of the original price
format(gInfo,24,"%s",GetPlayerNameEx(playerid));
gInfo = 1;
Save_Garage(i);
UpdateGarageInfo(i);
SendClientMessage(playerid,COLOR_SUCCESS,"Uspesno ste kupili ovu garazu.");
return 1;
}
}
SendClientMessage(playerid,COLOR_ERROR,"Error: Nisi blizu garaze!.");
return 1;
}PRODAJ
CMD:prodajgarazu(playerid,params[])
{
for(new i=0; i < garageCount+1; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, gInfo, gInfo, gInfo))
{
if(strcmp(gInfo,GetPlayerNameEx(playerid))) return SendClientMessage(playerid,COLOR_ERROR,"Error: Nisi vlasnik ove garaze.");
GivePlayerMoney(playerid,gInfo-random(500));
gInfo = 0;
format(gInfo,24,"the State");
gInfo = 1;
UpdateGarageInfo(i);
Save_Garage(i);
SendClientMessage(playerid, COLOR_SUCCESS,"Uspesno ste prodali svoju garazu.");
return 1;
}
}
SendClientMessage(playerid, COLOR_ERROR,"Nisi blizu garaze!.");
return 1;
}NAPRAVIGARAZU
CMD:napravigarazu(playerid,params[])
{
if(!IsPlayerAdmin(playerid)) return 0;
if(garageCount == MAX_GARAGES) return SendClientMessage(playerid, COLOR_USAGE, "Presli ste limit pravljenja garaze podigni limit u skriptu.");
new price, type;
if(sscanf(params,"dd",price, type)) return SendClientMessage(playerid, COLOR_USAGE, "CMD: /napravigarazu || Kucaj /garazatip da vidis tipove garaze.");
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
format(gInfo,24,"the State");
gInfo = 0;
gInfo = price;
gInfo = type;
gInfo = garageCount;
gInfo = X;
gInfo = Y;
gInfo = Z;
gInfo = 1;
new path;
format(path,sizeof(path),"garages/%d.ini",garageCount); //Format the path with the filenumber
dini_Create(path);
Save_Garage(garageCount);
UpdateGarageInfo(garageCount);
garageCount++;
SendClientMessage(playerid,COLOR_SUCCESS,"Garaza je kreirana!");
return 1;
} CODE 1
public OnFilterScriptExit()
{
Save_Garages();
Remove_PickupsAndLabels();
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno): http://imgur.com/a/PsMvg

