11.10.2017, 16:47
so, i have 75%% made my organization but problem is it doesnt save,
when i go in game it resets. i check my .ini file and it looks like this. i put coordinates name VW everything but it keeps reseting
script:
i got 0 errors and warnings but its screwed up.
+rep for helpers
when i go in game it resets. i check my .ini file and it looks like this. i put coordinates name VW everything but it keeps reseting
script:
PHP код:
enum pInfo
{
pPass,
pCash,
pAdmin, //1-test admin 2-trusted admin 3-veliki admin 4-skripteri maperi 5-owner
pScore,
pBankmoney,
pBanned,
pOrgID,
pRank,
pRegistriran,
pGodine, //min 13 max 60
pDrzava, //0-bih 1-hr 2-srb 3-mak 4-crna gora 5-kosovo 6-slovenija 7-ostalo
pSpol // 1 musko 2 zensko
}
PHP код:
new OrgInfo[MAX_ORGS][oInfo];
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ORG TEXT-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
stock UpdateOrgTexts()
{
for(new o=1;o<MAX_ORGS;o++)
{
new txt[300];
format(txt,sizeof(txt),""COL_BLUE"Ime organizacije: "COL_WHITE"%s\n"COL_BLUE"Broj clanova: "COL_WHITE"%d\n"COL_BLUE"Id: "COL_WHITE"%d",OrgInfo[o][oName],OrgInfo[o][oBrojClanova],OrgInfo[o][oID]);
Update3DTextLabelText(OrgTexts[o],-1, txt);
}
return 1;
}
PHP код:
stock SendOrgMessage(playerid,message[])
{
for(new i=0;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[playerid][pOrgID] == 1)
{
if(PlayerInfo[i][pOrgID] == 1)
{
SCM(i,COLOR_RED,message);
}
}
}
return 1;
}
PHP код:
stock LoadOrgs()
{
for(new o=1;o<sizeof(OrgInfo);o++)
{
new string[128];
format(string,sizeof(string),"/Organizacije/%d.ini",o);
INI_ParseFile(string, "LoadOrgs_%s", .bExtra = true, .extra = o);
OrgInfo[o][oID] = o;
OrgPickups[OrgInfo[o][oID]] = CreatePickup(1313,1,OrgInfo[o][oHqx],OrgInfo[o][oHqy],OrgInfo[o][oHqz]);
new txt[999];
format(txt,sizeof(txt),""COL_BLUE"Organizacija: "COL_WHITE"%s\n"COL_BLUE"Broj clanova: "COL_WHITE"%d\n"COL_BLUE"ID Organizacije: "COL_WHITE"%d",OrgInfo[o][oName],OrgInfo[o][oBrojClanova],OrgInfo[o][oID]);
OrgTexts[OrgInfo[o][oID]] = Create3DTextLabel(txt,-1,OrgInfo[o][oHqx],OrgInfo[o][oHqy],OrgInfo[o][oHqz],10.0,OrgInfo[o][oVW],0);
print(txt);
}
return 1;
}
PHP код:
public OnPlayerDisconnect(playerid, reason)
{
for(new o=1;o<MAX_ORGS;o++)
{
SacuvajOrg(o);
}
return 1;
}
PHP код:
forward SacuvajOrg(ido);
public SacuvajOrg(ido)
{
new string[128];
format(string,sizeof(string),"/Organizacije/%d.ini",ido);
new INI:File = INI_Open(string);
INI_SetTag(File,"orgdata");
INI_WriteString(File,"Name",OrgInfo[ido][oName]);
INI_WriteInt(File,"Droga",OrgInfo[ido][oDroga]);
INI_WriteInt(File,"Novac",OrgInfo[ido][oNovac]);
INI_WriteInt(File,"BrojClanova",OrgInfo[ido][oBrojClanova]);
INI_WriteFloat(File,"Hqx",OrgInfo[ido][oHqx]);
INI_WriteFloat(File,"Hqy",OrgInfo[ido][oHqy]);
INI_WriteFloat(File,"Hqz",OrgInfo[ido][oHqz]);
INI_WriteFloat(File,"Hqix",OrgInfo[ido][oHqix]);
INI_WriteFloat(File,"Hqiy",OrgInfo[ido][oHqiy]);
INI_WriteFloat(File,"Hqiz",OrgInfo[ido][oHqiz]);
INI_WriteInt(File,"VW",OrgInfo[ido][oVW]);
INI_WriteInt(File,"Int",OrgInfo[ido][oInt]);
INI_WriteInt(File,"ID",OrgInfo[ido][oID]);
INI_Close(File);
return 1;
}
+rep for helpers