3dtextlabel fucked up
#1

My code; OnGameModeInit.

pawn Код:
new biztext[128];
   
    for(new idx = 1; idx < sizeof(BusinessInfo); idx++)//Creates a loop, that goes through all of the businesses.
    {
    format(MessageString, sizeof(MessageString), BPATH, idx);//formats the file path, with the biz ID
    INI_ParseFile(MessageString, "loadbiz_%s", .bExtra = true, .extra = idx );//This is very hard to explain, but it basically loads the info from the file(More in ****** y_ini tutorial.)
    BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]); //Creates a pickup at the business entrance.
   
    switch(BusinessInfo[idx][bType])
    {
        case 1: biztext = "Bar";
        case 2: biztext = "Restaurant";
        case 3: biztext = "Phone Company";
        case 4: biztext = "24/7";
    }
   
    if(BusinessInfo[idx][On_Sell] == 1)
    {
    format(MessageString,sizeof(MessageString),""COLORGREEN"Owner: "COL_WHITE"None\n"COLORGREEN"Price: "COL_WHITE"%d\n"COLORGREEN"Business type: "COL_WHITE"%s", BusinessInfo[idx][bPrice], biztext);
    BusinessInfo[idx][DLabel] = CreateDynamic3DTextLabel(MessageString, 0xFFFFFF, BusinessInfo[idx][bEntranceX],BusinessInfo[idx][bEntranceY],BusinessInfo[idx][bEntranceZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10);
    }
    else if(BusinessInfo[idx][On_Sell] == 0)
    {
    format(MessageString,sizeof(MessageString),""COLORGREEN"Owner: "COL_WHITE"%s\n"COLORGREEN"Price: "COL_WHITE"%d\n"COLORGREEN"Business type: "COL_WHITE"%s",BusinessInfo[idx][bOwner], BusinessInfo[idx][bName], biztext);
    BusinessInfo[idx][DLabel] = CreateDynamic3DTextLabel(MessageString, 0xFFFFFF,  BusinessInfo[idx][bEntranceX],BusinessInfo[idx][bEntranceY],BusinessInfo[idx][bEntranceZ], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10);
    }
    }
    return 1;
}


How it looks in-game:



How it should look like:

Reply


Messages In This Thread
3dtextlabel fucked up - by Chrillzen - 31.03.2013, 09:48
Re: 3dtextlabel fucked up - by RajatPawar - 31.03.2013, 09:50
Re: 3dtextlabel fucked up - by Gamer_007 - 31.03.2013, 09:52
Re: 3dtextlabel fucked up - by Chrillzen - 31.03.2013, 10:00
Re: 3dtextlabel fucked up - by Threshold - 31.03.2013, 11:14
Re: 3dtextlabel fucked up - by Chrillzen - 31.03.2013, 11:41
Re: 3dtextlabel fucked up - by Chrillzen - 31.03.2013, 15:03

Forum Jump:


Users browsing this thread: 2 Guest(s)