- 0
Ajutor comanda /createhouses
-
Similar Content
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
xt3z0ne
Salut cum pot sa fac si eu comanda /createhouses
stock AH(hi,Float:iconX,Float:iconY,Float:iconZ,Float:interiorX,Float:interiorY,Float:interiorZ,Costa,Sella,Interiora) { //-------------------------------------------------------------------------- new house[128], string[612]; format(house, sizeof(house), "Houses/hi%d",hi); //-------------------------------------------------------------------------- if(!dini_Exists(house)) { dini_Create(house); format(hInfo[hi][Name], 24, "ForSale"); dini_Set(house, "Name", "ForSale"); format(hInfo[hi][Renter], 24, "ForRent"); dini_Set(house, "Renter", "ForRent"); hInfo[hi][Rentable] = 0; dini_IntSet(house, "Rentable", 0); hInfo[hi][Rentcost] = 0; dini_IntSet(house, "Rentcost", 0); hInfo[hi][Cost] = Costa; dini_IntSet(house, "Cost", Costa+00000); hInfo[hi][Sell] = Sella; dini_IntSet(house, "Sell", Sella); hInfo[hi][Interior] = Interiora; dini_IntSet(house, "Interior", Interiora); hInfo[hi][Virtualworld] = hi; dini_IntSet(house, "Locked", 1); hInfo[hi][InteriorX] = interiorX; hInfo[hi][InteriorY] = interiorY; hInfo[hi][InteriorZ] = interiorZ; dini_FloatSet(house, "X", interiorX); dini_FloatSet(house, "Y", interiorY); dini_FloatSet(house, "Z", interiorZ); dini_IntSet(house, "RentPay", 0); dini_IntSet(house, "RentGet", 0); hInfo[hi][Locked] = 1; print("-"); print("-------------(House Created)-------------"); printf("-> hi: %d", hi); printf("-> Buy Cost: %d", Costa+0000); printf("-> Sell Cost: %d", Sella); printf("-> Interior: %d", Interiora); printf("-> VirtualWorld: %d", hi); print("-----------------------------------------"); print("-"); } else { format(hInfo[hi][Name], 24, dini_Get(house, "Name")); format(hInfo[hi][Renter], 24, dini_Get(house, "Renter")); hInfo[hi][Rentable] = dini_Int(house, "Rentable"); hInfo[hi][Rentcost] = dini_Int(house, "Rentcost"); hInfo[hi][Cost] = dini_Int(house, "Cost"); hInfo[hi][Sell] = dini_Int(house, "Sell"); hInfo[hi][Interior] = dini_Int(house, "Interior"); hInfo[hi][Locked] = dini_Int(house, "Locked"); hInfo[hi][InteriorX] = dini_Float(house, "X"); hInfo[hi][InteriorY] = dini_Float(house, "Y"); hInfo[hi][InteriorZ] = dini_Float(house, "Z"); hInfo[hi][Virtualworld] = dini_Int(house, "Virtualworld"); } //-------------------------------------------------------------------------- hInfo[hi][iconx] = iconX; hInfo[hi][icony] = iconY; hInfo[hi][iconz] = iconZ; format(house, sizeof(house), "Houses/hi%d",hi); //-------------------------------------------------------------------------- if(strcmp(hInfo[hi][Name],"ForSale",true) == 0) { HousePickup[hi] = CreatePickup(1273, 23, iconX, iconY, iconZ); } else { HousePickup[hi] = CreatePickup(1272, 23, iconX, iconY, iconZ); } format(string, sizeof(string), "{00FF00}House\n{00FF00}Owned by: {FF0000}%s\n{00FF00}Cost: {FF0000}%i Coins\n{00FF00}Type {FF9900}/house {00FF00}for more info.", hInfo[hi][Name], hInfo[hi][Cost]); housei[hi] = Create3DTextLabel(string, red, iconX, iconY, iconZ, 15.0, 0, 0); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ stock GetHouseID(playerid) { for(new i = 0; i < MAX_HOUSES; i++) { if(PlayerToPoint(MAX_DISTANCE_TO_PROP, playerid, hInfo[i][iconx], hInfo[i][icony], hInfo[i][iconz])) { return i; } } return -255; }Are cineva idee.
Sunt un retardat
3 answers to this question
Recommended Posts