19.06.2010, 13:41
(Sry for bad English
)
This is my code but will only if (house info [i] [Vergeben] == 0)
Game Text displayed at if (House Info [Vergeben] == 1) does nothing.
Have also tried the two codes in a loop with
I just create a home system with BFX_INI and have created an enum, and query it creates as you can see:
[I] if (house info [i] [Vergeben] == 0 or 1)
Only works with 0, with 1 not works
Mfg
)Код:
public 12345()
{
new bString[256];
for(new i=0;i<MAX_HOUSES;i++)
{
if(IsPlayerInRangeOfPoint(i,3.0,HausInfo[i][eX],HausInfo[i][eY],HausInfo[i][eZ]))
{
if(OpenINI("Haus.cfg"))
{
format(bString, 64, "Vergeben%d", i);
HausInfo[i][Vergeben] = ReadIntKey(bString);
if(HausInfo[i][Vergeben] == 0)
{
format(bString, 64, "Preis%d", i);
HausInfo[i][Preis] = ReadIntKey(bString);
format(aString,sizeof(aString),"~g~Haus Informationen~n~~w~Preis: %d ~y~Besitzer: Staat ~b~",HausInfo[i][Preis]);
GameTextForPlayer(i,aString,2500,3);
}
}
CloseINI();
}
}
for(new i=0;i<MAX_HOUSES;i++)
{
if(IsPlayerInRangeOfPoint(i,3.0,HausInfo[i][eX],HausInfo[i][eY],HausInfo[i][eZ]))
{
if(OpenINI("Haus.cfg"))
{
format(bString, 64, "Vergeben%d", i);
HausInfo[i][Vergeben] = ReadIntKey(bString);
if(HausInfo[i][Vergeben] == 1)
{
format(bString, 64, "Preis%d", i);
HausInfo[i][Preis] = ReadIntKey(bString);
format(bString, 64, "Besitzer%s", i);
HausInfo[i][Besitzer] = ReadIntKey(bString);
format(aString,sizeof(aString),"~g~Haus Informationen~n~~w~Geld: %d ~y~Besitzer: %s ~b~",HausInfo[i][Preis],HausInfo[i][Besitzer]);
GameTextForPlayer(i,aString,2500,3);
}
}
CloseINI();
}
}
return 1;
}
Game Text displayed at if (House Info [Vergeben] == 1) does nothing.
Have also tried the two codes in a loop with
Код:
for(new i=0;i<MAX_HOUSES;i++)
{
if(IsPlayerInRangeOfPoint(i,3.0,HausInfo[i][eX],HausInfo[i][eY],HausInfo[i][eZ]))
{
if(OpenINI("Haus.cfg"))
{
format(bString, 64, "Vergeben%d", i);
HausInfo[i][Vergeben] = ReadIntKey(bString);
if(HausInfo[i][Vergeben] == 0)
{
format(bString, 64, "Preis%d", i);
HausInfo[i][Preis] = ReadIntKey(bString);
format(aString,sizeof(aString),"~g~Haus Informationen~n~~w~Preis: %d ~y~Besitzer: Staat ~b~",HausInfo[i][Preis]);
GameTextForPlayer(i,aString,2500,3);
}
else
{
format(bString, 64, "Preis%d", i);
HausInfo[i][Preis] = ReadIntKey(bString);
format(bString, 64, "Besitzer%s", i);
HausInfo[i][Besitzer] = ReadIntKey(bString);
format(aString,sizeof(aString),"~g~Haus Informationen~n~~w~Geld: %d ~y~Besitzer: %s ~b~",HausInfo[i][Preis],HausInfo[i][Besitzer]);
GameTextForPlayer(i,aString,2500,3);
}
}
CloseINI();
}
return 1;
}
[I] if (house info [i] [Vergeben] == 0 or 1)
Only works with 0, with 1 not works
Mfg

