[Cueball's Zone System] House Pickup text not displaying full string
#1

I am using Cueball's Zone System, and the text above a house pickup (I made the house system) says (well, part of it says) "1 Blueberr" when it should say something like "1 Blueberry".

Here is a screenshot:


The script has no errors and no warnings.

Here is the part of the code that has the house system:
pawn Код:
CMD:createhouse(playerid, params[])
{
    new price;
    new HouseID = HouseCount;
    new Location[35];
    new string[256];
    new AddressID;

    if(sscanf(params, "i", price))
    {
        SendClientMessage(playerid, COLOR_RED, "USAGE: /createhouse [Price]");
        return 1;
    }
    else
    {
        if(pInfo[playerid][Admin] >= 4)
        {
            GetPlayer2DZone(playerid, Location, 28);
            new Float:x, Float:y, Float:z;
            GetPlayerPos(playerid, x, y, z);
            hInfo[HouseID][Owned] = false;
            strmid(hInfo[HouseID][HouseOwner], "None", 0, strlen("None"), strlen("None"));
            hInfo[HouseID][HouseX] = x;
            hInfo[HouseID][HouseY] = y;
            hInfo[HouseID][HouseZ] = z;
            hInfo[HouseID][Price] = price;
            hInfo[HouseID][Locked] = true;
            hInfo[HouseID][HousePickup] = true;
            zInfo[GetPlayer2DZoneID(playerid)][HousesInZone]++;
            AddressID = zInfo[GetPlayer2DZoneID(playerid)][HousesInZone];
            format(string, sizeof(string), "%d %s", AddressID, Location);
            strmid(hInfo[HouseID][HouseAddress], string, 0, strlen(string), strlen(string));
            hInfo[HouseID][DoorPickup] = CreateDynamicPickup(1273, 1, x, y, z, -1, 0);
            format(string, sizeof(string), "{00FF00}House for Sale\n{00FFFF}$%d\nAddress: %s", price, hInfo[HouseID][HouseAddress]);
            hInfo[HouseID][DoorTextID] = CreateDynamic3DTextLabel(string, 0x008080FF, x, y, z + 0.5, 50.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1);
            Iter_Add(Houses, HouseID);
            format(string, sizeof(string), "-| House ID %d created! |-", HouseID);
            SendClientMessage(playerid, COLOR_GREEN, string);
            hInfo[HouseID][Buyable] = true;
            HouseFileCreate(HouseID);
            HouseCount++;
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a high enough level to use this command.");
        }
    }
    return 1;
}

CMD:delhouse(playerid, params[])
{
    new string[128];
    new HouseID;

    if(pInfo[playerid][Admin] >= 4)
    {
        foreach(new h : Houses)
        {
            if(IsValidDynamicPickup(hInfo[h][DoorPickup]))
            {
                if(IsPlayerInRangeOfPoint(playerid, 2.5, hInfo[h][HouseX], hInfo[h][HouseY], hInfo[h][HouseZ]))
                {
                    format(string, sizeof(string), "-| House ID %d deleted. |-", h);
                    SendClientMessage(playerid, COLOR_RED, string);
                    hInfo[h][Owned] = false;
                    strmid(hInfo[HouseID][HouseName], "Deleted", 0, strlen("Deleted"), strlen("Deleted"));
                    DestroyDynamicPickup(hInfo[h][DoorPickup]);
                    HouseFileRemove(h);
                    DestroyDynamic3DTextLabel(hInfo[h][DoorTextID]);
                    hInfo[h][Buyable] = false;
                    Iter_Remove(Houses, h);
                    zInfo[GetPlayer2DZoneID(playerid)][HousesInZone]--;
                    return 1;
                }
            }
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a high enough level to use this command.");
    }
    return 1;
}
Any help?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)