01.09.2010, 19:56
Hello I want to script a hous system which creates 3dtextlabels with name cost and so on.
The Housepickup in the game is created but there is no 3dtextlabel.
what i doing wrong?
(pls answer in easy english I'm from Germany^^)
hear is the script pls help me!
The Housepickup in the game is created but there is no 3dtextlabel.
what i doing wrong?
(pls answer in easy english I'm from Germany^^)
hear is the script pls help me!
Код:
#define MAX_HOUSES 1 enum Info4 { Float:PicX, Float:PicY, Float:PicZ, Float:IntX, Float:IntY, Float:IntZ, Interior, Virtualworld, Kosten, Verkauf, } new HouseInfo[MAX_HOUSES][Info4]; new Text3D:HouseLabel[MAX_HOUSES]; AddHouse(houseid, Float:X, Float:Y, Float:Z, Float:IX, Float:IY, Float:IZ, interior, virtualworld, kauf, verkauf) { HouseInfo[houseid][PicX] = X; HouseInfo[houseid][PicY] = Y; HouseInfo[houseid][PicZ] = Z; HouseInfo[houseid][IntX] = IX; HouseInfo[houseid][IntY] = IY; HouseInfo[houseid][IntZ] = IZ; HouseInfo[houseid][Interior] = interior; HouseInfo[houseid][Virtualworld] = virtualworld; HouseInfo[houseid][Kosten] = kauf; HouseInfo[houseid][Verkauf] = verkauf; CreatePickup(1273, 23, X, Y, Z, 0); new string[64]; format(string,sizeof(string),"/Haus/Haus_%i.ini",houseid); if(!dini_Exists(string)) { dini_Create(string); dini_Set(string,"Besitzer","Zu Verkaufen"); dini_IntSet(string,"Miete",0); dini_IntSet(string,"Hauskasse",0); dini_IntSet(string,"Status",0); HouseLabel[houseid] = Create3DTextLabel("Besitzer: Zu Verkaufen\nMiete: nicht zu vermieten",COLOR_BLUE,X,Y,Z+2,40.0,0); } else { if(dini_Int(string,"Status") == 0) { HouseLabel[houseid] = Create3DTextLabel("Besitzer: Zu Verkaufen\nMiete: nicht zu vermieten",COLOR_BLUE,X,Y,Z+2,40.0,0); return 1; } new str[128]; if(dini_Int(string,"Status") == 1) { format(str,sizeof(str),"Besitzer: %s\nMiete: nicht zu vermieten",dini_Get(string,"Besitzer")); HouseLabel[houseid] = Create3DTextLabel(str,COLOR_BLUE,X,Y,Z+2,40.0,0); return 1; } if(dini_Int(string,"Status") == 2) { format(str,sizeof(str),"Besitzer: %s\nMiete: %d",dini_Get(string,"Besitzer"),dini_Int(string,"Miete")); HouseLabel[houseid] = Create3DTextLabel(str,COLOR_BLUE,X,Y,Z+2,40.0,0); return 1; } } return 1; }