Label and pickup
#1

What could be the problem so this won't execute
PHP код:
CreateApartments(id)
{
    if(
ApartmentInfo[id][aOwnerCheck] == 0)
    {
        new 
string[340];
        
format(stringsizeof(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(string0x1D9F00AAApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]+0.125.0___00__);
        
ApartmentPickup[id] = CreateDynamicPickup(195231ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]);
    }
    else if(
ApartmentInfo[id][aOwnerCheck] == 1)
    {
        new 
string[320], string2[220], string3[540];
        
format(stringsizeof(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(string2sizeof(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(string3sizeof(string3), "%s%s"stringstring2);
        
ApartmentLabel[id] = CreateDynamic3DTextLabel(string30x1D9F00AAApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]+0.125.0___00__);
        
ApartmentPickup[id] = CreateDynamicPickup(195241ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]);
    }
    return 
1;

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..
Reply
#2

Also When I get to that pos there is not pickup but I can buy the apartment. When I buy it pickup is shown..
Could It be maybe pickup id that is fucking things up

EDIT: No it is not ID. I used another pickup still the same..
But funny thing is that when I buy apartmet I use UpdateApartments
PHP код:
UpdateApartments(idtype)
{
    if(
type == 1)
    {
        if(
ApartmentInfo[id][aOwnerCheck] == 0)
        {
            new 
string[320];
            
format(stringsizeof(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]);
            
UpdateDynamic3DTextLabelText(ApartmentLabel[id], 0x1D9F00AAstring);
        }
        else if(
ApartmentInfo[id][aOwnerCheck] == 1)
        {
            new 
string[320], string2[220], string3[540];
            
format(stringsizeof(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(string2sizeof(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(string3sizeof(string3), "%s%s"stringstring2);
            
UpdateDynamic3DTextLabelText(ApartmentLabel[id], 0x1D9F00AAstring3);
        }
    }
    if(
type == 2)
    {
        
DestroyDynamic3DTextLabel(ApartmentLabel[id]);
        
DestroyDynamicPickup(ApartmentPickup[id]);
        if(
ApartmentInfo[id][aOwnerCheck] == 0)
        {
            new 
string[340];
            
format(stringsizeof(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(string0x1D9F00AAApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ]+0.125.0___00__);
            
ApartmentPickup[id] = CreateDynamicPickup(195231ApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ]);
        }
        else if(
ApartmentInfo[id][aOwnerCheck] == 1)
        {
            new 
string[320], string2[220], string3[540];
            
format(stringsizeof(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(string2sizeof(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(string3sizeof(string3), "%s%s"stringstring2);
            
ApartmentLabel[id] = CreateDynamic3DTextLabel(string30x1D9F00AAApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ]+0.125.0___00__);
            
ApartmentPickup[id] = CreateDynamicPickup(195241ApartmentInfo[id][aEnterX], ApartmentInfo[id][aEnterY], ApartmentInfo[id][aEnterZ]);
        }
    }
    return 
1;

And It is shown after I buy it..
Reply
#3

i guess..
maybe when you create it on CreateApartments,
all ApartmentInfo[id][aEnterX], ApartmentInfo[id][aExitY], ApartmentInfo[id][aEnterZ]
is not set pos
Reply
#4

Why don't you use Create3DLabel instead of this function? I mean this is the same thing because you are even not using additionnal params.
Reply
#5

@Alvitr

I am using it on create..

@Dayrion

Problem is that I have same funcion with houses and it is working perfectly..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)