I've fixed the problem (thanks to bigcomfycouch), that I can't pickup the pickups of my House System. But now I have another problem. The houses are loaded correctly with the pickups and prices, but the 3DTextLabel above them are only showed at the first 2/3 pickups of my script. So I have 45 pickups and about 30 works with those 3DTextLabels, but the last 15 ones doesn't have a TextLabel over them. (edit: now its a little bit strange, some of those 15 houses have Pickup and Label, some Pickup without Label, some only Label and some nothing
pawn Code:
public LoadHouses()
{
new path[128];
for(new h=1; h<MAX_HOUSE; h++)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
format(path,sizeof(path),"/hauser/%i.ini",h);
if(fexist(path))
{
new world = i;
new Float:x, Float:y, Float:z, Region[256], owner[256], Preis, icon[256];
owner = dini_Get(path,"Owner");
Region = dini_Get(path,"Gebiet");
Preis = dini_Int(path,"Preis");
x = dini_Float(path,"X");
y = dini_Float(path,"Y");
z = dini_Float(path,"Z");
if(strcmp(owner,"Frei"))
{
format(icon,sizeof(icon),"Besitzer: %s\nRegion: %s",owner, Region);
Create3DTextLabel(icon, COLOR_BLUE, x, y, z+1.0, 20.0, world, 1);
CreatePickup(1272, 1, x, y, z, world);
}
else
{
format(icon,sizeof(icon),"Frei.\nRegion:%s\nPreis: %i$",Region,Preis);
Create3DTextLabel(icon, COLOR_GREEN, x, y, z+1.0, 20.0, world, 1);
CreatePickup(1273, 1, x, y, z, world);
}
}
}
}
return 1;
}
It's called in OnGameModeInit. I hope you can help me.