21.07.2011, 02:24
Alright, as I am scripting for 10 Hours already, in order to change a thing, little one.
What I want to change is Vortex's house icon > 3DTextLabel.
I never thought it'll take me so long.
After multiple attempts & tests & helping threads, I couldn't figure out why 3DText dosent appears?
Here is a picture from the last attempt of mine, which is actually an evidence that it is not working :
I cant find out, where's the problems and the bugs that blocks it to work properly as its supposed to work.
Please, I will keep working on this till it gets done, but I could use some generous help or assistance to get this working :].
Things I edited or created in order to atleast get a 3D text, but havent succeed :
Does anyone has suggestion for me or a tip, or even a script fix, so I can get this working?
I dont ask you to do this for me, I just want to learn from my mistakes, and the most to get this working.
Will appericate any help =]!.
What I want to change is Vortex's house icon > 3DTextLabel.
I never thought it'll take me so long.
After multiple attempts & tests & helping threads, I couldn't figure out why 3DText dosent appears?
Here is a picture from the last attempt of mine, which is actually an evidence that it is not working :
I cant find out, where's the problems and the bugs that blocks it to work properly as its supposed to work.
Please, I will keep working on this till it gets done, but I could use some generous help or assistance to get this working :].
Things I edited or created in order to atleast get a 3D text, but havent succeed :
Код:
stock InitHouses() { new FileName[128]; new labelString[96]; for(new h = 0; h < sizeof(Houses); h++) { format(FileName, sizeof(FileName), "Houses/House_%d.ini", h); if(fexist(FileName)) { Houses[h][hInteriorID] = dini_Int(FileName, "InteriorID"); Houses[h][hInteriorX] = dini_Float(FileName, "InteriorX"); Houses[h][hInteriorY] = dini_Float(FileName, "InteriorY"); Houses[h][hInteriorZ] = dini_Float(FileName, "InteriorZ"); Houses[h][HousePrice] = dini_Int(FileName, "HousePrice"); Houses[h][hExteriorID] = dini_Int(FileName, "ExteriorID"); Houses[h][hExteriorX] = dini_Float(FileName, "ExteriorX"); Houses[h][hExteriorY] = dini_Float(FileName, "ExteriorY"); Houses[h][hExteriorZ] = dini_Float(FileName, "ExteriorZ"); Houses[h][VaultMoney] = dini_Int(FileName, "VaultMoney"); Houses[h][HouseCocaine] = dini_Int(FileName, "HouseCocaine"); Houses[h][HousePot] = dini_Int(FileName, "HousePot"); Houses[h][HouseMaterials] = dini_Int(FileName, "HouseMaterials"); Houses[h][hOwner] = dini_Get(FileName, "Owner"); Houses[h][LockStatus] = dini_Int(FileName, "LockStatus"); Houses[h][WeaponSlot1] = dini_Int(FileName, "WeaponSlot1"); Houses[h][WeaponSlot2] = dini_Int(FileName, "WeaponSlot2"); Houses[h][WeaponSlot3] = dini_Int(FileName, "WeaponSlot3"); new NewHouseID = SpawnedHouses+1; if(strcmp(Houses[h][hOwner], "Nobody", true) == 0) { format(labelString, sizeof(labelString), "House %d\n Price: %d",NewHouseID, h); CreateDynamic3DTextLabel(labelString, ADMIN_GREEN, Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1); } else { format(labelString, sizeof(labelString), "House %d",NewHouseID); Create3DTextLabel(labelString,RED,Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1); } printf("[system] House %d spawned.", h); SpawnedHouses++; } } return 1; }
Код:
if(strcmp(Usage, "complete", true) == 0) { if(Player[playerid][HouseInterior] > 0 || Player[playerid][HouseExterior] > 0) { new NewHouseID = SpawnedHouses+1; if(NewHouseID >= MAX_HOUSES) { SendClientMessage(playerid, WHITE, "Too many houses are currently spawned!"); } else { format(string, sizeof(string), "Houses/House_%d.ini", NewHouseID); if(!fexist(string)) { new labelString[96]; Houses[NewHouseID][hInteriorID] = Player[playerid][hIntID]; Houses[NewHouseID][hExteriorID] = Player[playerid][hExtID]; Houses[NewHouseID][hInteriorX] = Player[playerid][hIntX]; Houses[NewHouseID][hInteriorY] = Player[playerid][hIntY]; Houses[NewHouseID][hInteriorZ] = Player[playerid][hIntZ]; Houses[NewHouseID][hExteriorX] = Player[playerid][hExtX]; Houses[NewHouseID][hExteriorY] = Player[playerid][hExtY]; Houses[NewHouseID][hExteriorZ] = Player[playerid][hExtZ]; format(Houses[NewHouseID][hOwner], 255, "Nobody"); Houses[MAX_HOUSES-1][hLabelID] = CreateDynamic3DTextLabel(labelString, ADMIN_GREEN, Houses[NewHouseID][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1); Houses[NewHouseID][LockStatus] = 0; dini_Create(string); dini_IntSet(string, "InteriorID", Houses[NewHouseID][hInteriorID]); dini_FloatSet(string, "InteriorX", Houses[NewHouseID][hInteriorX]); dini_FloatSet(string, "InteriorY", Houses[NewHouseID][hInteriorY]); dini_FloatSet(string, "InteriorZ", Houses[NewHouseID][hInteriorZ]); dini_IntSet(string, "HousePrice", 0); dini_IntSet(string, "ExteriorID", 0); dini_FloatSet(string, "ExteriorX", Houses[NewHouseID][hExteriorX]); dini_FloatSet(string, "ExteriorY", Houses[NewHouseID][hExteriorY]); dini_FloatSet(string, "ExteriorZ", Houses[NewHouseID][hExteriorZ]); dini_IntSet(string, "VaultMoney", -1); dini_IntSet(string, "HouseCocaine", -1); dini_IntSet(string, "HousePot", -1); dini_IntSet(string, "HouseMaterials", -1); dini_Set(string, "Owner", "Nobody"); dini_IntSet(string, "LockStatus", Houses[NewHouseID][LockStatus]); Player[playerid][HouseExterior]--; Player[playerid][HouseInterior]--; SpawnedHouses++; SendClientMessage(playerid, NICESKY, "Successfully created house!"); SetPlayerInterior(playerid, Houses[NewHouseID][hExteriorID]); for(new h=0; h < MAX_HOUSES; h++) { format(labelString, sizeof(labelString), "House %d\n Price: %d", NewHouseID, Houses[h][HousePrice]); SetPlayerPos(playerid, Houses[NewHouseID][hExteriorX], Houses[NewHouseID][hExteriorY], Houses[NewHouseID][hExteriorZ]); } } else { SendClientMessage(playerid, WHITE, "Error: File already exists!"); } } } else { SendClientMessage(playerid, WHITE, "You must select an exterior and an interior first!"); } } } } return 1; }
Код:
stock Create3DHouse() { new string[ 96 ]; 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][hExteriorX],Houses[NewHouseID][hExteriorY],Houses[NewHouseID][hExteriorZ],30.0,0,1); } 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); } } }
Does anyone has suggestion for me or a tip, or even a script fix, so I can get this working?
I dont ask you to do this for me, I just want to learn from my mistakes, and the most to get this working.
Will appericate any help =]!.