13.01.2012, 19:53
In the enum it's
In the /createhouse command it's
In the AddHousesToFile its
In another part of the addhousesfromfile it's
In AddHouseToFile it's
pawn Код:
pHouseName[24],
pawn Код:
for(new i = 0; i < MAX_HOUSES; i++)
{
Houses[NewHouseID][pHouseName] = format(string, 24, "House %i.", i);
}
pawn Код:
stock AddHousesFromFiles()
{
new
HouseName[24]
pawn Код:
while(mysql_fetch_row(Str))
{
sscanf(Str, "s[24]s[24]dffffff", HouseName, HouseOwner, HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ);
pawn Код:
stock AddHouseToFile(HouseName, HouseOwner, HousePrice, Float:ExteriorX, Float:ExteriorY, Float:ExteriorZ, Float:InteriorX, Float:InteriorY, Float:InteriorZ)
{
new
Query[1024];
format(Query, sizeof(Query), "INSERT INTO `houses` (HouseName[24], HouseOwner[24], HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ) VALUES(%s[24], %s[24, %d, %f, %f, %f, %f, %f, %f)",
HouseName, HouseOwner, HousePrice, ExteriorX, ExteriorY, ExteriorZ, InteriorX, InteriorY, InteriorZ);
mysql_query(Query);
mysql_free_result();
return 1;
}