Update3DTextLabel and some others not working
#1

Hello,

Take a look at the code below.

pawn Код:
else if(dialogid == DIALOG_SELLHOUSETOME)
    {
        new price = GetPVarInt(playerid,"SellingPrice"),seller = GetPVarInt(playerid,"SellingFrom"),h = GetPVarInt(playerid,"AtHouseID");
        if(response)
        {
            if(IsPlayerConnected(seller))
            {
                new Float:Pos[3];
                GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
                if(IsPlayerInRangeOfPoint(seller,5.0,Pos[0],Pos[1],Pos[2]))
                {
                    new string[75];
                    GivePlayerCash(playerid,-price);
                    GivePlayerCash(seller,price);
                    mysql_format(1,QueryString,"UPDATE `HouseInfo` SET `Owner` = '%s' WHERE `ID` = %d",PlayerName(playerid),h);
                    mysql_function_query(1,QueryString,false,"SomeNotExistingCallback","","");
                    format(HouseInfo[h][Owner],MAX_PLAYER_NAME,"%s",PlayerName(playerid));
                    SendFormatMessage(playerid,COLOR_WHITE,"You have successfully bought this house from {FFFF00}%s {FFFFFF}for {008000}$%d. {FFFFFF}Congratulations!",PlayerName(seller),price);
                    SendFormatMessage(seller,COLOR_WHITE,"You have successfully sold your house to {FFFF00}%s {FFFFFF}for {008000}$%d. {FFFFFF}Congratulations!",PlayerName(playerid),price);
                    format(string,sizeof(string),"[House -NOT for sale]\r\n{FFFF00}Owner: {FFFFFF}%s",PlayerName(playerid));
                    Update3DTextLabelText(HouseInfo[h][Label],COLOR_LIGHTGREEN,string);
                    return 1;
                }
                else return SendClientMessage(playerid,COLOR_RED,"(( Error: That player is not near you. ))");
            }
        }
        else
        {
            SendFormatMessage(playerid,COLOR_YELLOW,"You have declined %s's offer to purchase his house.",PlayerName(seller));
            SendFormatMessage(seller,COLOR_YELLOW,"%s has declined your offer to purchase your house.",PlayerName(playerid));
            return 1;
        }
    }
Update3DTextLabel does not work at all, and neither the 'format' which updated the owner name works. They simply do not change the texts. I even tried to set totally different (static) texts but they simply do not update. I am sure the IDs are right!

Maybe a SA-MP bug? At other places Update3DTextLabel works - weird.

Jochem
Reply


Messages In This Thread
Update3DTextLabel and some others not working - by Jochemd - 17.07.2012, 13:57
Re: Update3DTextLabel and some others not working - by CyNiC - 17.07.2012, 14:08
Re: Update3DTextLabel and some others not working - by Jochemd - 17.07.2012, 14:10
Re: Update3DTextLabel and some others not working - by CyNiC - 17.07.2012, 14:22
Re: Update3DTextLabel and some others not working - by Jochemd - 17.07.2012, 14:28
Re: Update3DTextLabel and some others not working - by CyNiC - 18.07.2012, 02:53

Forum Jump:


Users browsing this thread: 1 Guest(s)