star69
-
Posts
55 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Everything posted by star69
-
salut!
Ma poti ajuta cu o problema?
am deschis subiect dar a fost sters, nu stiu de ce
public LoadHouses()
{
for(new i=1; i<=MAX_HOUSES; i++)
{
format(gQuery,256, "SELECT * FROM `"Houses_Table"` WHERE `ID` = '%i'", i);
mysql_query(gQuery);
mysql_store_result();
if(mysql_num_rows() == 0) break; //If there are 0 rows, then end the query.
else if(mysql_num_rows() != 0)
{
mysql_fetch_row_format(gQuery);
sscanf(gQuery, "e<p<|>is[25]iiiiiffffff>", HouseInfo); //Retrieving everything from the database...
new lString[256];
switch(HouseInfo[Owned])
{
case 0:
{
format(lString, sizeof(lString), "House Owned: No\nHouse Owner: None\nHouse Price: $%i", HouseInfo[Price]);
HouseInfo[Label] = CreateDynamic3DTextLabel(lString, COLOR_BLUE, HouseInfo[OX], HouseInfo[OY], HouseInfo[OZ]+0.5, 20.0);
HouseInfo[Icon] = CreateDynamicMapIcon(HouseInfo[OX], HouseInfo[OY], HouseInfo[OZ], 31, -1);
HouseInfo[EnterPickup] = CreateDynamicPickup(1273, 23, HouseInfo[OX], HouseInfo[OY], HouseInfo[OZ], -1, -1, -1, 20.0);
HouseInfo[ExitPickup] = CreateDynamicPickup(1273, 23, HouseInfo[IX], HouseInfo[IY], HouseInfo[IZ], -1, -1, -1, 20.0);
}
case 1:
{
format(lString, sizeof(lString),"House Owned: Yes\nHouse Owner: %s\nHouse Price: $%i\nHouse Locked: %s", HouseInfo[Owner], HouseInfo[Price], (HouseInfo[Locked] == 1) ? ("Yes") : ("No"));
HouseInfo[Label] = CreateDynamic3DTextLabel(lString, COLOR_RED, HouseInfo[OX], HouseInfo[OY], HouseInfo[OZ]+0.5, 20.0);
HouseInfo[Icon] = CreateDynamicMapIcon(HouseInfo[OX], HouseInfo[OY], HouseInfo[OZ], 32, -1);
HouseInfo[EnterPickup] = CreateDynamicPickup(1273, 23, HouseInfo[OX],HouseInfo[OY], HouseInfo[OZ], -1, -1, -1, 20.0);
HouseInfo[ExitPickup] = CreateDynamicPickup(1273, 23, HouseInfo[IX], HouseInfo[IY], HouseInfo[IZ], -1, -1, -1, 20.0);
}
}
CreatedHouses++;
}
}
mysql_free_result();
printf("[House System] %i houses were retrieved..", CreatedHouses);
return 1;
}Vreau sa-l fac compatibil cu mysql r39
Este din acest sistem http://samp-scripts.com/post/16926/House_System_[MySQL,_ZCMD]/biker122/filterscript/systems
Celelante linii le-am facut compatibile, casele se creeaza, modificarile se fac cand le cer
numai ca nu se incarca casele cand intru pe server