3d Text label dont load anything
#1

Hi guys

I have a problem with my property system.
When i create a property my 3D text label shows:
Name of the property
Price of the property
and the property ID

When I restart my server with the sa-mp server close and open it again it only shows:
Name of the property.
I don't know at wich lines that is the problem or what you need to help me? Please say that and I post it here.

Thank you for if you want to help
Reply
#2

Give related code please
Reply
#3

This is the load property:

public LoadProperty(propertyid)
{
format(savestring,255,"/properties/prop_%d.SAV",propertyid);
if(!dini_Exists(savestring))return 0;
Props[propertyid][id]=propertyid;
Props[propertyid][Intnum]=dini_Int(savestring,"intnum");
Props[propertyid][InteriorWorld]=dini_Int(savestring,"InteriorWorld");
Props[propertyid][DoorUsed_1]=dini_Int(savestring,"DoorUsed_1");
Props[propertyid][DoorUsed_2]=dini_Int(savestring,"DoorUsed_2");
Props[propertyid][IsLocked]=dini_Int(savestring,"IsLocked");
Props[propertyid][Keycode]=dini_Int(savestring,"Keycode");
Props[propertyid][PropertyType]=dini_Int(savestring,"PropertyType");
Props[propertyid][SubPropertyType]=dini_Int(savestring,"SubPropertyType");
Props[propertyid][CurrentPrice]=dini_Int(savestring,"CurrentPrice");
Props[propertyid][DefaultPrice]=dini_Int(savestring,"DefaultPrice");
Props[propertyid][Payment]=dini_Int(savestring,"Payment");
Props[propertyid][OneTimerPayment]=dini_Int(savestring,"OneTimerPayment");
Props[propertyid][Fine]=dini_Int(savestring,"Fine");
Props[propertyid][Money]=dini_Int(savestring,"Money");
Props[propertyid][Income]=dini_Int(savestring,"Income");
Props[propertyid][OneTimerIncome]=dini_Int(savestring,"OneTimerIncome");
Props[propertyid][LastEnter]=dini_Int(savestring,"LastEnter");
Props[propertyid][EnterX_1]=dini_Float(savestring,"EnterX_1");
Props[propertyid][EnterY_1]=dini_Float(savestring,"EnterY_1");
Props[propertyid][EnterZ_1]=dini_Float(savestring,"EnterZ_1");
Props[propertyid][EnterX_2]=dini_Float(savestring,"EnterX_2");
Props[propertyid][EnterY_2]=dini_Float(savestring,"EnterY_2");
Props[propertyid][EnterZ_2]=dini_Float(savestring,"EnterZ_2");
Props[propertyid][ExitX_1]=dini_Float(savestring,"ExitX_1");
Props[propertyid][ExitY_1]=dini_Float(savestring,"ExitY_1");
Props[propertyid][ExitZ_1]=dini_Float(savestring,"ExitZ_1");
Props[propertyid][ExitA_1]=dini_Float(savestring,"ExitA_1");
Props[propertyid][ExitX_2]=dini_Float(savestring,"ExitX_2");
Props[propertyid][ExitY_2]=dini_Float(savestring,"ExitY_2");
Props[propertyid][ExitZ_2]=dini_Float(savestring,"ExitZ_2");
Props[propertyid][ExitA_2]=dini_Float(savestring,"ExitA_2");
#if USE_TEXTDRAW 1
format(PropStrings[propertyid][EnterText],200,"%s",dini_Get(savestring,"EnterText"));
format(PropStrings[propertyid][LeaveText],200,"%s",dini_Get(savestring,"LeaveText"));
#endif
#if USE_ENTER_LABELS 1
format(PropStrings[propertyid][EnterDoorLabel],200,"%s",dini_Get(savestring,"EnterDoorLabel"));
Props[propertyid][EnterDoorLabelID]=Create3DTextLabel(PropStrings[propertyid][EnterDoorLabel],0xFFFFFFFF,Props[propertyid][EnterX_1],Props[propertyid][EnterY_1],Props[propertyid][EnterZ_1],80.0,0,1);
#endif
Amount_Props++;
return 1;
}

And this is for the 3D text label:
#if USE_ENTER_LABELS 1

format(PropStrings[Amount_Props][EnterDoorLabel],199,"Name (%s)\nPrice: $%d\nPropId: %d",Property_Coordinates[intnum][interiorname],Props[Amount_Props][CurrentPrice], Props[Amount_Props][id]);
Props[Amount_Props][EnterDoorLabelID]=Create3DTextLabel(PropStrings[Amount_Props][EnterDoorLabel],0xFFFFFFFF,EnterX,EnterY,(EnterZ+0.5000),80.0,0,1 );
#endif
Props[Amount_Props][LastEnter]=gettime();
SaveProperty(Amount_Props);
Amount_Props++;
return 1;
}

Hope you have enough, anything just ask
Reply
#4

Are this enough lines? or when you see it and you need something post it! cause I need help :$
Reply
#5

Nothing seems wrong there
Reply
#6

But it is wrong, maybe I should post how it saves:

public SaveProperty(propertyid)
{
format(savestring,255,"\\properties\\prop_%d.SAV", propertyid);
if(!dini_Exists(savestring))
{
dini_Create(savestring);
}
dini_IntSet(savestring,"intnum",Props[propertyid][Intnum]);
dini_IntSet(savestring,"InteriorWorld",Props[propertyid][InteriorWorld]);
dini_IntSet(savestring,"DoorUsed_1",Props[propertyid][DoorUsed_1]);
dini_IntSet(savestring,"DoorUsed_2",Props[propertyid][DoorUsed_2]);
dini_IntSet(savestring,"IsLocked",Props[propertyid][IsLocked]);
dini_IntSet(savestring,"Keycode",Props[propertyid][Keycode]);
dini_IntSet(savestring,"PropertyType",Props[propertyid][PropertyType]);
dini_IntSet(savestring,"SubPropertyType",Props[propertyid][SubPropertyType]);
dini_IntSet(savestring,"CurrentPrice",Props[propertyid][CurrentPrice]);
dini_IntSet(savestring,"DefaultPrice",Props[propertyid][DefaultPrice]);
dini_IntSet(savestring,"Payment",Props[propertyid][Payment]);
dini_IntSet(savestring,"OneTimerPayment",Props[propertyid][OneTimerPayment]);
dini_IntSet(savestring,"Fine",Props[propertyid][Fine]);
dini_IntSet(savestring,"Money",Props[propertyid][Money]);
dini_IntSet(savestring,"Income",Props[propertyid][Income]);
dini_IntSet(savestring,"OneTimerIncome",Props[propertyid][OneTimerIncome]);
dini_IntSet(savestring,"LastEnter",Props[propertyid][LastEnter]);
dini_FloatSet(savestring,"EnterX_1",Props[propertyid][EnterX_1]);
dini_FloatSet(savestring,"EnterY_1",Props[propertyid][EnterY_1]);
dini_FloatSet(savestring,"EnterZ_1",Props[propertyid][EnterZ_1]);
dini_FloatSet(savestring,"EnterX_2",Props[propertyid][EnterX_2]);
dini_FloatSet(savestring,"EnterY_2",Props[propertyid][EnterY_2]);
dini_FloatSet(savestring,"EnterZ_2",Props[propertyid][EnterZ_2]);
dini_FloatSet(savestring,"ExitX_1",Props[propertyid][ExitX_1]);
dini_FloatSet(savestring,"ExitY_1",Props[propertyid][ExitY_1]);
dini_FloatSet(savestring,"ExitZ_1",Props[propertyid][ExitZ_1]);
dini_FloatSet(savestring,"ExitA_1",Props[propertyid][ExitA_1]);
dini_FloatSet(savestring,"ExitX_2",Props[propertyid][ExitX_2]);
dini_FloatSet(savestring,"ExitY_2",Props[propertyid][ExitY_2]);
dini_FloatSet(savestring,"ExitZ_2",Props[propertyid][ExitZ_2]);
dini_FloatSet(savestring,"ExitA_2",Props[propertyid][ExitA_2]);
#if USE_TEXTDRAW 1
dini_Set(savestring,"EnterText",PropStrings[propertyid][EnterText]);
dini_Set(savestring,"LeaveText",PropStrings[propertyid][LeaveText]);
#endif
#if USE_ENTER_LABELS 1
dini_Set(savestring,"EnterDoorLabel",PropStrings[propertyid][EnterDoorLabel]);
#endif
return 1;
}

Please help it realy doenst workd!! after restart I only see the name and not the price and property ID
Reply
#7

Someone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)