MySQL Doesn't load houses
#3

Well, if I haven't looped it, it would atleast load one house if it's setup correctly, right?

SAVING
pawn Код:
CMD:createhouse(playerid, params[])
{
    if(g_PlayerInfo[playerid][pAdmin] == 6 && g_AdminLogged[playerid] == 1)
    {
        new
            string[128],
            query[300],
            Float:x,
            Float:y,
            Float:z;

        HouseID++;

        format(string, sizeof(string), "STREET NOT SET\nResidence of The State\nPrice: $%d", g_HouseInfo[HouseID][hPrice]);
        GetPlayerPos(playerid, x, y, z);
       
        g_HouseInfo[HouseID][hPickup] = CreateDynamicPickup(1273, 23, x, y, z, 0, 0, -1, 250);
        g_HouseInfo[HouseID][hLabel] = CreateDynamic3DTextLabel(string, -1, x, y, z, 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
       
        format(string, sizeof(string), "House ID: %d created", HouseID);
        SendClientMessage(playerid, -1, string);
       
        g_HouseInfo[HouseID][hWorld] = HouseID;
       
        format(query, sizeof(query), "INSERT INTO `Houses` (ID, Owner, Owned, OwnerID, EnPosX, EnPosY, EnPosZ, \
                    Interior, World, Pickup, Price, Locked, StreetName, LabelID) \
                    VALUES('%i', 'The State', '0', '499', '%f', '%f', '%f', '0', '%d', '1273', '500000', '1', 'Default', '%d')"
,
                    HouseID, x, y, z, g_HouseInfo[HouseID][hWorld], _:g_HouseInfo[HouseID][hLabel]);
        mysql_function_query(g_Handle, query, false, "SendQuery", "");
       
    } else return SendClientMessage(playerid, -1, "SERVER: You are not authorized to use this command.");
    return 1;
}
Reply


Messages In This Thread
MySQL Doesn't load houses - by Tingesport - 12.05.2014, 11:22
Re: MySQL Doesn't load houses - by iZN - 12.05.2014, 11:35
Re: MySQL Doesn't load houses - by Tingesport - 12.05.2014, 11:40
Re: MySQL Doesn't load houses - by iZN - 12.05.2014, 11:49
Re: MySQL Doesn't load houses - by Tingesport - 12.05.2014, 11:54
Re: MySQL Doesn't load houses - by iZN - 12.05.2014, 12:03
Re: MySQL Doesn't load houses - by Tingesport - 12.05.2014, 12:06
Re: MySQL Doesn't load houses - by iZN - 12.05.2014, 12:12
Re: MySQL Doesn't load houses - by Tingesport - 12.05.2014, 12:19

Forum Jump:


Users browsing this thread: 1 Guest(s)