Armour Store, Not working correctly, Screenshots.
#1

The problem is...When I try and store armour into the house, it messes up when it tries to get the amount. It's really odd. It sets the armour correctly, however but it also keeps displaying the 0.00000 crap... even though using floatround





As you can see I stored 50 of my armour (I only set it to 50) and it does this..




pawn Код:
if(!strcmp(item, "armour", true))
            {
                HouseArmour[houseid] = MySQL_GetFloat(houseid, "HouseArmour", "houses");
                GetPlayerArmour(playerid, PlayerArmour[playerid]);
                new Float: armour;
                if(sscanf(params, "s[24]s[32]f",usage,item,armour))
                {
                    SendClientMessage(playerid, COLOUR_GREY, "Usage: /house store armour [amount]");
                    return 1;
                }

                if(armour < 1 || armour > 100)return SendClientMessage(playerid, COLOUR_GREY, "Amount must be between 0 and 100");
                if(armour > PlayerArmour[playerid])return SendClientMessage(playerid, COLOUR_GREY, "You do not have this much armour");

                HouseArmour[houseid] += armour;
                PlayerArmour[playerid] -= armour;

                MySQL_SetFloat(houseid, "HouseArmour", HouseArmour[houseid], "houses");
                MySQL_SetFloat(PlayerSQLID[playerid], "Armour", PlayerArmour[playerid], "accounts");

                format(string, sizeof(string), "You have stored %f of armour, you now have a total of: %f armour in your house", floatround(armour), floatround(HouseArmour[houseid]));
                SendClientMessage(playerid, COLOUR_BLUE, string);
                format(string, sizeof(string), "* %s has stored some armour in their house.", GetNameEx(playerid));
                SetPlayerArmour(playerid, PlayerArmour[playerid]);
                ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
            }
Any help would be good.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)