20.07.2011, 19:47
Ah. You are forgetting to use the string parameter that you created for the function. Example:
However, you never use the variable (to any real purpose to pass a specific value to it) through the function. You should just create the variable inside the funciton. You would also leave 26159 as it is.
pawn Код:
Houses[NewHouseID][H3DText] = Create3DHouse("You don't use this");
pawn Код:
stock Create3DHouse()
{
new string[ 128 ];
for(new h = 0; h < sizeof(Houses); h++)
{
new NewHouseID = SpawnedHouses+1;
if(Houses[h][HousePrice] == -1)
{
format(string, sizeof(string), "House %d", h);
Create3DTextLabel(string,RED,Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0);
}
else
{
format(string, sizeof(string), "House %d\n Price: %d", h, Houses[h][HousePrice]);
Create3DTextLabel(string,ADMIN_GREEN,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0);
}
}
}