Jump to content

Arrogance

Membru
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Arrogance

  1. Problema intalnita (descriere): Cand dau restart la server nu se salveaza nici o casa, si nu am idee de la ce poate fi. Iar la skinuri si la ore, tot la restart, celor din factiuni li se schimb skin-ul, si civililor. Ero(area / rile) / warning-(ul / urile): - Liniile de cod / sursa / script-ul(obligatoriu): Nu am idee ce sa pun .. La case, uitati public-ul de la IniHouses + stock savehouse stock saveHouse(const id) { if(strlen(houseVariables[id][hHouseOwner]) >= 1) { format(szLargeString, sizeof(szLargeString), "UPDATE houses SET houseExteriorPosX = '%f', houseExteriorPosY = '%f', houseExteriorPosZ = '%f', houseInteriorPosX = '%f', houseInteriorPosY = '%f', houseInteriorPosZ = '%f'", houseVariables[id][hHouseExteriorPos][0], houseVariables[id][hHouseExteriorPos][1], houseVariables[id][hHouseExteriorPos][2], houseVariables[id][hHouseInteriorPos][0], houseVariables[id][hHouseInteriorPos][1], houseVariables[id][hHouseInteriorPos][2]); format(szLargeString, sizeof(szLargeString), "%s, housePrice = '%d', houseOwner = '%s', houseExteriorID = '%d', houseInteriorID = '%d', houseLocked = '%d', houseMoney = '%d', houseRent = '%d', hDescription = '%e' WHERE houseID = '%d'", szLargeString, houseVariables[id][hHousePrice], houseVariables[id][hHouseOwner], houseVariables[id][hHouseExteriorID], houseVariables[id][hHouseInteriorID], houseVariables[id][hHouseLocked], houseVariables[id][hMoney], houseVariables[id][hRent], houseVariables[id][hDescription],id); mysql_tquery(handle,szLargeString); } else { return false; } return 1; } public IniHouses() { new Cache: result7 = mysql_query (handle, "SELECT * FROM `houses` ORDER BY `houses`.`houseID` ASC"); new x; for ( new i, j = cache_get_row_count ( ); i != j; ++i ) { cache_get_field_content(i, "houseID", result); x = strval(result); cache_get_field_content(i, "houseOwner", result); format(houseVariables[x][hHouseOwner], 32, result); cache_get_field_content(i, "houseExteriorPosX", result); houseVariables[x][hHouseExteriorPos][0] = floatstr(result); cache_get_field_content(i, "houseExteriorPosY", result); houseVariables[x][hHouseExteriorPos][1] = floatstr(result); cache_get_field_content(i, "houseExteriorPosZ", result); houseVariables[x][hHouseExteriorPos][2] = floatstr(result); cache_get_field_content(i, "houseInteriorPosX", result); houseVariables[x][hHouseInteriorPos][0] = floatstr(result); cache_get_field_content(i, "houseInteriorPosY", result); houseVariables[x][hHouseInteriorPos][1] = floatstr(result); cache_get_field_content(i, "houseInteriorPosZ", result); houseVariables[x][hHouseInteriorPos][2] = floatstr(result); cache_get_field_content(i, "houseInteriorID", result); houseVariables[x][hHouseInteriorID] = strval(result); cache_get_field_content(i, "houseExteriorID", result); houseVariables[x][hHouseExteriorID] = strval(result); cache_get_field_content(i, "housePrice", result); houseVariables[x][hHousePrice] = strval(result); cache_get_field_content(i, "houseLocked", result); houseVariables[x][hHouseLocked] = strval(result); cache_get_field_content(i, "houseMoney", result); houseVariables[x][hMoney] = strval(result); cache_get_field_content(i, "houseRent", result); houseVariables[x][hRent] = strval(result); cache_get_field_content(i, "hDescription", result); format(houseVariables[x][hDescription], 64, result); if(!strcmp(houseVariables[x][hHouseOwner], "Nobody", true) && strlen(houseVariables[x][hHouseOwner]) >= 1) { new labelString[256]; if(houseVariables[x][hHouseLocked] == 1) { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}Nobody{FFFFFF}nPrice: {990000}$%d{FFFFFF}nRent: {990000}$%d{FFFFFF}n(locked)", houseVariables[x][hDescription], x, houseVariables[x][hHousePrice], houseVariables[x][hRent]); } else { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}Nobody{FFFFFF}nPrice: {990000}$%d{FFFFFF}nRent: {990000}$%d{FFFFFF}nPress {990000}F{FFFFFF} to enter", houseVariables[x][hDescription],x, houseVariables[x][hHousePrice], houseVariables[x][hRent]); } houseVariables[x][hLabelID] = CreateDynamic3DTextLabel(labelString, COLOR_YELLOW, houseVariables[x][hHouseExteriorPos][0], houseVariables[x][hHouseExteriorPos][1], houseVariables[x][hHouseExteriorPos][2], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); houseVariables[x][hPickupID] = CreateDynamicPickup(1273, 23, houseVariables[x][hHouseExteriorPos][0], houseVariables[x][hHouseExteriorPos][1], houseVariables[x][hHouseExteriorPos][2], 0, houseVariables[x][hHouseExteriorID], -1, 250); } else { new labelString[256]; if(houseVariables[x][hHouseLocked] == 1) { if(houseVariables[x][hHousePrice] >= 1) { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}%s{FFFFFF}nPrice: {990000}$%d{FFFFFF}nRent: {990000}$%d{FFFFFF}n(locked)",houseVariables[x][hDescription], x, houseVariables[x][hHouseOwner],houseVariables[x][hHousePrice], houseVariables[x][hRent]); } else { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}%s{FFFFFF}nRent: {990000}$%d{FFFFFF}n(locked)",houseVariables[x][hDescription], x, houseVariables[x][hHouseOwner], houseVariables[x][hRent]); } } else { if(houseVariables[x][hHousePrice] >= 1) { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}%s{FFFFFF}nPrice: {990000}$%d{FFFFFF}nRent: {990000}$%d{FFFFFF}nPress {990000}F{FFFFFF} to enter",houseVariables[x][hDescription], x, houseVariables[x][hHouseOwner],houseVariables[x][hHousePrice], houseVariables[x][hRent]); } else { format(labelString, sizeof(labelString), "{990000}%sn{FFFFFF}House: {990000}%d{FFFFFF}nOwner: {990000}%s{FFFFFF}nRent: {990000}$%d{FFFFFF}nPress {990000}F{FFFFFF} to enter", houseVariables[x][hDescription],x, houseVariables[x][hHouseOwner], houseVariables[x][hRent]); } } houseVariables[x][hLabelID] = CreateDynamic3DTextLabel(labelString, COLOR_YELLOW, houseVariables[x][hHouseExteriorPos][0], houseVariables[x][hHouseExteriorPos][1], houseVariables[x][hHouseExteriorPos][2], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); houseVariables[x][hPickupID] = CreateDynamicPickup(1272, 23, houseVariables[x][hHouseExteriorPos][0], houseVariables[x][hHouseExteriorPos][1], houseVariables[x][hHouseExteriorPos][2], 0, houseVariables[x][hHouseExteriorID], -1, 250); } } printf("[script] %d houses loaded.", systemVariables[houseCount]); cache_delete(result7); return 1; } Imagini / Video (optional):- Ati incercat sa rezolvati singur?: Nu stiu de la ce provine mai exact problema. Daca va ajuta cu ceva, sau stiti problemele acelui GM, folosesc GM-ul lui Mojo(cel putin este editat de el..).
×
×
  • Create New...

Important Information

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.