POMOC HITNO

Započeo Bilsen_Jahjagic, Mart 30, 2013, 20:19:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Bilsen_Jahjagic

Skripta koju koristim:SERP
Problem:Ubacio sam ivex cos u gm i ne ocitava mi vozila iz fajla evo stock loadveh ,fajl cuvanja/updatea je v file.cfg.Kad kod restartujem server igrac opet mora da kupi vozila i sve tako.Ako neko moze da mi sredi hitno je
Dio moda:stock LoadMyVehSystem()
{
new reload[256];
new loader[64];
if(!dini_Exists(SaveFile))
{
dini_Create(SaveFile);
}
for(new i = 0;i<sizeof(MyVehicle);i++)
{
    format(loader,sizeof(loader),"MyCar_%d",i);
    strmid(reload,dini_Get(SaveFile,loader),0,256,256);
new data2[32]; //STRING
sscanf(reload,
"p<,>dd\
ffff\
ddd\
s[64]\
d\
dddd\
d",
MyVehicle[i][MyVehSlot],MyVehicle[i][MyVehModel],
MyVehicle[i][MyVehPos][0],MyVehicle[i][MyVehPos][1],MyVehicle[i][MyVehPos][2],MyVehicle[i][MyVehPos][3],
MyVehicle[i][MyVehCol][0],MyVehicle[i][MyVehCol][1],MyVehicle[i][MyVehLock],
data2, // string
MyVehicle[i][MyVehAlarm],
MyVehicle[i][MyVehCar],MyVehicle[i][MyVehBike],MyVehicle[i][MyVehBoat],MyVehicle[i][MyVehPlane],
MyVehicle[i][MyVehFsale]);
strmid(MyVehicle[i][MyVehOwner], data2, 0, strlen(data2), 64);// kraj loadanja

if(MyVehicle[i][MyVehSlot] == 1 && (MyVehicle[i][MyVehCar] != -1 || MyVehicle[i][MyVehBike] != -1 || MyVehicle[i][MyVehBoat] != -1 || MyVehicle[i][MyVehPlane] != -1))
{
MyVehicle[i][MyVehID] = CreateVehicle(MyVehicle[i][MyVehModel],MyVehicle[i][MyVehPos][0],MyVehicle[i][MyVehPos][1],MyVehicle[i][MyVehPos][2],MyVehicle[i][MyVehPos][3],MyVehicle[i][MyVehCol][0],MyVehicle[i][MyVehCol][1],30000);
}
}
  return 1;
}

update
stock UpdateMyVehSystem(id)
{
new GSi[256];
new place[64];
if(!dini_Exists(SaveFile))
{
dini_Create(SaveFile);
}
format(GSi,sizeof(GSi),
"%d,%d,\
%f,%f,%f,%f,\
%d,%d,%d,\
%s,\
%d,\
%d,%d,%d,%d,\
%d",
MyVehicle[id][MyVehSlot],MyVehicle[id][MyVehModel],
MyVehicle[id][MyVehPos][0],MyVehicle[id][MyVehPos][1],MyVehicle[id][MyVehPos][2],MyVehicle[id][MyVehPos][3],
MyVehicle[id][MyVehCol][0],MyVehicle[id][MyVehCol][1],MyVehicle[id][MyVehLock],
MyVehicle[id][MyVehOwner], // string
MyVehicle[id][MyVehAlarm],
MyVehicle[id][MyVehCar],MyVehicle[id][MyVehBike],MyVehicle[id][MyVehBoat],MyVehicle[id][MyVehPlane],
MyVehicle[id][MyVehFsale]);
format(place,sizeof(place),"MyCar_%d",id);
    dini_Set(SaveFile,place,GSi);
    printf("ID %d SET",id);
    if(MyVehicle[id][MyVehSlot] == 0)
        {
                format(GSi,sizeof(GSi),
"%d,%d,\
%f,%f,%f,%f,\
%d,%d,%d,\
%s,\
%d,\
%d,%d,%d,%d,\
%d",
MyVehicle[id][MyVehSlot],MyVehicle[id][MyVehModel],
MyVehicle[id][MyVehPos][0],MyVehicle[id][MyVehPos][1],MyVehicle[id][MyVehPos][2],MyVehicle[id][MyVehPos][3],
MyVehicle[id][MyVehCol][0],MyVehicle[id][MyVehCol][1],MyVehicle[id][MyVehLock],
MyVehicle[id][MyVehOwner], // string
MyVehicle[id][MyVehAlarm],
MyVehicle[id][MyVehCar],MyVehicle[id][MyVehBike],MyVehicle[id][MyVehBoat],MyVehicle[id][MyVehPlane],
MyVehicle[id][MyVehFsale]);
format(place,sizeof(place),"MyCar_%d",id);
            dini_Unset(SaveFile ,place);
            printf("ID %d UNSET",id);
        }
  return 1;
}

Slike:/

Bilsen_Jahjagic


Moj savet "Mani se dinija Y_ini mng bolji i po meni laksi"
RESPECT: Blaeks, Yui_Sang, Gagi, Kapetan Husein, Luksa, Slay, Denis_Lapi, Zoran(Dude)

Programski jezici koje koristim: C, C#, Visual Basic, HTML, CSS, PHP (tek ucim).


Bilsen_Jahjagic

Jel zna neko ovo kako da fixam ?

Bilsen_Jahjagic

Jel zna neko kako da napravim da ga cuva igracu u acc i da radi ?