Command problem
#1

pawn Код:
CMD:createhouse(playerid, params[])
{
    new Float:EnterX, Float:EnterY, Float:EnterZ;

    new price, housename[100], houseowner[24];

    if(sscanf(params,"i",price))
    {
        SendClientMessage(playerid,COLOR_YELLOW,"Usage:{FFFFFF} /createhouse [price]");
        return 1;
    }

    GetPlayerPos(playerid, EnterX, EnterY, EnterZ);

    format(hInfo[houseid][Hname], 100, "%s", DEFAULT_HOUSE_NAME);
    format(hInfo[houseid][owner], 24, "%s", DEFAULT_HOUSE_NAME_OWNER);
    hInfo[houseid][Hname] = 0;
    hInfo[houseid][costprice] = price;
    hInfo[houseid][hEnterPos][0] = EnterX;
    hInfo[houseid][hEnterPos][1] = EnterY;
    hInfo[houseid][hEnterPos][2] = EnterZ;
    hInfo[houseid][Type] = 0;
    hInfo[houseid][hcheckpointidx][0] = CreateDynamicCP(EnterX, EnterY, EnterZ, 1.0);
    //CreateDynamicCP(Float:x, Float:y, Float:z, Float:size);
    hInfo[houseid][hcheckpointidx][1] = CreateDynamicCP(271.884979, 306.631988, 999.148437, 1.0, 15500000+houseid, 2, -1, 5.0);
    //CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid, interiorid);
    format(fquery, sizeof(fquery), "{00bbff}House Name:{FFFFFF} %s(%d)\n{00bbff}House Owner:{FFFFFF} %s\n{00bbff}House Price:{FFFFFF} $%s" , DEFAULT_HOUSE_NAME, DEFAULT_HOUSE_NAME_OWNER, Comma(hInfo[houseid][costprice]));
    hInfo[houseid][htextid][0] = CreateDynamic3DTextLabel(fquery, COLOR_YELLOW, EnterX, EnterY, EnterZ + 0.5, 15.0, 0, 1);
    hInfo[houseid][htextid][1] = CreateDynamic3DTextLabel("[Exit]", 0x00bbffFF, 271.884979, 306.631988, 999.148437, 15.0, 15500000+houseid, 1);
    format(fquery,sizeof(fquery), "INSERT INTO `HOUSEINFO` (`ID`, `Title`, `Owner`, `Price`, `EnterX`, `EnterY`, `EnterZ` `Type`) values('%d', '%s', '%s', '%d','%f','%f','%f', '%d')",
                                                                                                houseid,
                                                                                                hInfo[houseid][Hname],
                                                                                                hInfo[houseid][owner],
                                                                                                hInfo[houseid][costprice],
                                                                                                hInfo[houseid][hEnterPos][0],
                                                                                                hInfo[houseid][hEnterPos][1],
                                                                                                hInfo[houseid][hEnterPos][2],
                                                                                                hInfo[houseid][Type]);
    db_free_result(db_query(db_open(HouseDB), fquery));
    houseid ++;
    return 1;
}
Create the checkpoint so good, but does not create the label , please help
Reply
#2

small BUMP!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)