24.03.2014, 08:54
PHP код:
stock SetPlayerInt(username[], stolb[], znach)
{
new Query[128];
format(Query, sizeof(Query), "UPDATE "TABLE_ACCOUNT" SET %s = '%i' WHERE ID = '%s' LIMIT 1", stolb, znach, username);
return mysql_query(Query);
}
PHP код:
stock SetPlayerStr(username[], stolb[], znach[])
{
new Query[128];
format(Query, sizeof(Query), "UPDATE "TABLE_ACCOUNT" SET %s = '%s' WHERE Name = '%s' LIMIT 1", stolb, znach, username);
return mysql_query(Query);
}
PHP код:
stock SetHouseStr(idx, stolb[], znach[])
{
new Query[128];
format(Query, sizeof(Query), "UPDATE "TABLE_HOUSE" SET %s = '%s' WHERE `ID` = '%i' LIMIT 1", stolb, znach, idx);
return mysql_query(Query);
}
PHP код:
stock SetHouseInt(idx, stolb[], znach)
{
new Query[128];
format(Query, sizeof(Query), "UPDATE "TABLE_HOUSE" SET %s = '%i' WHERE `ID` = '%i' LIMIT 1", stolb, znach, idx);
return mysql_query(Query);
}
PHP код:
UpdateHouseInfo(h)
{
DestroyDynamicMapIcon(HouseInfo[h][hMIcon]);
DestroyPickup(HouseInfo[h][hPickup]);
if (HouseInfo[h][hOwned] == 0)
{
HouseInfo[h][hMIcon] = CreateDynamicMapIcon(HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ], 31, 0, -1, -1, -1, 150.0);
HouseInfo[h][hPickup] = CreatePickup(1273, 23, HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ]);
return 1;
}
else if (HouseInfo[h][hOwned] == 1)
{
HouseInfo[h][hMIcon] = CreateDynamicMapIcon(HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ], 32, 0, -1, -1, -1, 150.0);
HouseInfo[h][hPickup] = CreatePickup(1272, 23, HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ]);
return 1;
}
return 1;
}