Pickup not being created.
#1

Hey there, first of all - thank you for reading this.

Alright, so I have the following code:
pawn Код:
CMD:movehouse(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] < 5) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: You are not authorized to perform this command!");
    if(sscanf(params, "d", houseid)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /movehouse [houseid]");
    format(file, sizeof(file), "Houses/House_%d.ini", houseid);
    if(!fexist(file)) return SendClientMessage(playerid, COLOR_ERROR, "ERROR: The selected house is not implented in the server!");
    GetPlayerPos(playerid, x, y, z);
    Delete3DTextLabel(HouseLabel[houseid]);
    DestroyPickup(HouseInfo[houseid][Pickupid]);
    format(housetext, sizeof(housetext), "{1BBF39}[ House ID:{FFFFFF} %d{1BBF39} ]", houseid);
    if(strval(dini_Get(file, "Owned")) == 1)
    {
        format(aname, sizeof(aname), "%s", dini_Get(file, "Owner"));
        kreplace(aname, '_', ' ');
        format(housetextadd, sizeof(housetextadd), "\n{1BBF39}Owner:{FFFFFF} %s", aname);
        strcat(housetext, housetextadd);
    }
    if(strval(dini_Get(file, "ForSale")) == 1 && HouseInfo[houseid][Price] != 666)
    {
        format(housetextadd1, sizeof(housetextadd1), "\n{1BBF39}Price:{FFFFFF} %d", Value);
        strcat(housetext, housetextadd1);
    }
    if(HouseInfo[houseid][ForRent] == 1 && HouseInfo[houseid][RentPrice] != 666)
    {
        format(housetextadd1, sizeof(housetextadd1), "\n{1BBF39}Rent:{FFFFFF} %d\n{1BBF39}Commands: {FFFFFF}/rentroom /unrent", HouseInfo[houseid][RentPrice]);
        strcat(housetext, housetextadd1);
    }
    GetPlayerPos(playerid, x, y, z);
    HouseLabel[houseid] = Create3DTextLabel(housetext, 0xFFFFFFFF, x, y, z, 10.0, 0, 0);
    housepickup[houseid] = CreatePickup(HouseInfo[houseid][Pickupid], 1, x, y, z, 0); // THIS ISN'T WORKING
    dini_FloatSet(file, "EnterX", x);
    dini_FloatSet(file, "EnterY", y);
    dini_FloatSet(file, "EnterZ", z);
    HouseInfo[houseid][EnterX] = x;
    HouseInfo[houseid][EnterY] = y;
    HouseInfo[houseid][EnterZ] = z;
    return 1;
}
When I use this command, everything works just fine, except the marked line.
I've debugged the command and it worked properly.

What am I doing wrong?
Reply


Messages In This Thread
Pickup not being created. - by Denying - 15.03.2013, 17:26
Re: Pickup not being created. - by Denying - 16.03.2013, 10:07
Re: Pickup not being created. - by Jstylezzz - 16.03.2013, 10:12
Re: Pickup not being created. - by Mystique - 16.03.2013, 10:26
Re: Pickup not being created. - by Denying - 16.03.2013, 10:26
Re: Pickup not being created. - by Mystique - 16.03.2013, 10:29
Re: Pickup not being created. - by Denying - 16.03.2013, 10:31
Re: Pickup not being created. - by Mystique - 16.03.2013, 10:42
Re: Pickup not being created. - by Denying - 16.03.2013, 10:59

Forum Jump:


Users browsing this thread: 1 Guest(s)