27.11.2016, 18:02
What could be the problem so this won't execute
There is command that is creating apartments. It is working nice and apartments are saved in DB but problem is that pickups and labels are not created..
I copied that from houses
I also debuged it.. It is executed it but labels are not shown..
PHP код:
CreateApartments(id)
{
if(ApartmentInfo[id][aOwnerCheck] == 0)
{
new string[340];
format(string, sizeof(string), ""SERVERBLUE"ID: "WHITE"%d\n"SERVERBLUE"House on sale\n"SERVERBLUE"Type: "WHITE"%s\n"SERVERBLUE"Price: "WHITE"%d\n"SERVERBLUE"Level: "WHITE"%d\n"SERVERBLUE"To buy house type /buyhouse", ApartmentInfo[id][aID], ApartmentInfo[id][aType], ApartmentInfo[id][aPrice], ApartmentInfo[id][aLevel]);
ApartmentLabel[id] = CreateDynamic3DTextLabel(string, 0x1D9F00AA, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
ApartmentPickup[id] = CreateDynamicPickup(19523, 1, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]);
}
else if(ApartmentInfo[id][aOwnerCheck] == 1)
{
new string[320], string2[220], string3[540];
format(string, sizeof(string), ""SERVERBLUE"ID: "WHITE"%d\n"SERVERBLUE"[ "WHITE"%s "SERVERBLUE"]\n"SERVERBLUE"Owner: "WHITE"%s\n"SERVERBLUE"Type: "WHITE"%s\n", ApartmentInfo[id][aID], ApartmentInfo[id][aDescription], ApartmentInfo[id][aOwnerName], ApartmentInfo[id][aType]);
format(string2, sizeof(string2), ""SERVERBLUE"Level: "WHITE"%d\n"SERVERBLUE"Price: "WHITE"%d\n"SERVERBLUE"To enter press 'F' or 'ENTER'", ApartmentInfo[id][aLevel], ApartmentInfo[id][aPrice]);
format(string3, sizeof(string3), "%s%s", string, string2);
ApartmentLabel[id] = CreateDynamic3DTextLabel(string3, 0x1D9F00AA, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
ApartmentPickup[id] = CreateDynamicPickup(19524, 1, ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]);
}
return 1;
}
I copied that from houses
I also debuged it.. It is executed it but labels are not shown..