Jump to content

cstef4n

Membru
  • Posts

    32
  • Joined

  • Last visited

Everything posted by cstef4n

  1. am scos-o de la resetvariables dar degeaba, tot asa apare
  2. salutare, Aveti idee de ce nu imi arata meniul cu "Colors, Add Nos etc" cand intru in Trans Fender? Video:
  3. poftim: new PlayerText: SpeedoTD; La ResetVariables(playerid): PlayerTextDrawHide(playerid, SpeedoTD); La OnPlayerSpawn: PlayerTextDrawHide(playerid, SpeedoTD); La OnPlayerStateChange: if(newstate == PLAYER_STATE_ONFOOT) { PlayerTextDrawHide(playerid, SpeedoTD); } function Checkvehinfo(i) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new status[180], str[256], benzina[64], engine,lights,alarm,doors,bonnet,boot,objective, vehicle = GetPlayerVehicleID(i), spe = Carspeed(i), carid = FindSpawnID(vehicle); GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective); if(doors == 1) { status = "Doors: ~r~Locked~w~~h~"; } else if(doors == 0) { status = "Doors: ~w~Unlocked~w~~h~"; } else status = "Doors: ~w~Unlocked~w~~h~"; if(Gas[vehicle] > 20) format(benzina, sizeof(benzina), "%d", Gas[vehicle]); else format(benzina, sizeof(benzina), "~r~%d", Gas[vehicle]); if(CarInfo[carid][cID] != -2 && carid != 0 && !IsAPlane(vehicle)) { if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~y~%d~w~~h~ km/h~w~~h~~n~Odometer: %.2f~n~%s~n~Fuel: %s%s", spe, CarInfo[carid][KM], status, benzina, "%"); else format(str, sizeof(str), "Speed: ~y~%d~w~~h~ km/h~n~Odometer: %.2f~n~%s", spe, CarInfo[carid][KM], status); PlayerTextDrawSetString(i, SpeedoTD, str); PlayerTextDrawShow(i, SpeedoTD); } else { if(!IsABike(vehicle) && !IsAPlane(vehicle)) format(str, sizeof(str), "Speed: ~y~%d~w~~h~ km/h~w~~h~~n~%s~n~Fuel: %s%s", spe, status, benzina, "%"); else format(str, sizeof(str), "Speed: ~y~%d~w~~h~ km/h~n~%s", spe, status); if(IsAPlane(vehicle) && CarInfo[carid][cID]) format(str, sizeof(str), "Speed: ~y~%d~w~~h~ km/h~n~Odometer: %.2f~n~%s", spe, CarInfo[carid][KM], status); PlayerTextDrawSetString(i, SpeedoTD, str); PlayerTextDrawShow(i, SpeedoTD); } } return 1; } function Spedometer() { foreach(Player, i) { if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) Checkvehinfo(i); } } return 1; } spedometertimer = SetTimer("Spedometer", 1000, true); Asta e tot .
  4. am incercat mane dar tot nu merge. Daca ai timp sa intri tu in PC la mine sa verifici codul ar fi mai ok
  5. ingreuneaza serverul daca pun timer-ul asa: spedometertimer = SetTimer("Spedometer", 10, true); (10 milisecunde) ?
  6. distrug textdraw-ul la: onplayerspawn si cand iese din vehiculul taxi
  7. salutare, Cand actualizez textdraw-ul speedometer la secunda apare si dispare, cod: spedometertimer = SetTimer("Spedometer", 1000, true); function Spedometer() { foreach(Player, i) { if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) Checkvehinfo(i); } } return 1; } Video:
  8. Am rezolvat, trebuia Delet3DTextlabel nu Distroy; Puteti da T/C
  9. il distrug la despawnvehicle dar tot imi arata text3d-ul if(strlen(CarInfo[dbid][c3DTextLabelText]) > 4) DestroyDynamic3DTextLabel(vehicle3Dtext[CarInfo[dbid][Spawned]]);
  10. am si eu o problema, cand achizitionez 3d text label pe vehicul si il vand la dealership, apoi cand cumpar alt vehicul din dealership imi arata 3d text label-ul pe vehicul cu toate ca nu e upgradat. COD: function attach_label_text(idd) { new string[256]; if(strlen(CarInfo[idd][c3DTextLabelText]) > 4) { format(string, sizeof(string), "%s", CarInfo[idd][c3DTextLabelText]); vehicle3Dtext[CarInfo[idd][Spawned]] = Create3DTextLabel(string, 0xFF0000AA, 0.0, 0.0, 0.0, 15.0, 0, 1 ); Attach3DTextLabelToVehicle(vehicle3Dtext[CarInfo[idd][Spawned]] , CarInfo[idd][Spawned], 0.0, 0.0, 0.0); } return 1; } Video:
  11. Mersi mult mane, o sa incerc cand ajung acasa si iti zic daca merge
  12. Cum pot face sa seteze automat random vremea pe server cu ID-urile (weather) alese de mine Exemplu: Vreau sa seteze automat weather cu ID-urile 1,2,3,5,9,12,15
  13. salutare, Cine ma poate ajuta si pe mine, cand expira billboard-ul nu seteaza jucatorului offline variabila Billboard pe 0 Cod: function ScadeTimpBillboard() { new query[248]; for(new i = 0; i < MAX_BILLBOARDS; i++) { if(Billboard[i][blOwned] > 0) { if(Billboard[i][blExpire] > 0) { Billboard[i][blExpire] -= 60; UpdateLabelBillboard(i); mysql_format(SQL, query, sizeof(query), "UPDATE `billboards` SET `expire`='%d' WHERE `ID`='%d'", Billboard[i][blExpire], i); mysql_tquery(SQL, query, "", ""); if(Billboard[i][blExpire] <= 0) { ---- > AICI (la ownerbill) <--- new ownerbill[64]; cache_get_field_content( 0, "blOwner", ownerbill, SQL, 64); mysql_format(SQL, query, sizeof query, "UPDATE `users` SET `Billboard` = '0' WHERE `Username` = '%s'", ownerbill); mysql_tquery(SQL, query, "", "" ); Billboard[i][blOwned] = 0; Billboard[i][blPhone] = 0; Billboard[i][blExpire] = 0; format(Billboard[i][blOwner],25,"AdmBot"); format(Billboard[i][blFont],25,"Arial"); format(Billboard[i][blMessage],32,"Your advertisment here!"); mysql_format(SQL,query,248,"UPDATE `billboards` SET `blFont`='Arial',`blOwned`='0',`blOwner`='AdmBot',`blPhone`='0',`blMessage`='Your advertisment here!',`expire`='0' WHERE `ID` = '%d' LIMIT 1",Billboard[i][blID]); mysql_tquery(SQL,query,"",""); SetDynamicObjectMaterialText(Billboard[i][blObjectID],0,Billboard[i][blMessage], OBJECT_MATERIAL_SIZE_256x128,Billboard[i][blFont], 18, 0, 0xFF000000, 0xFFFFFFFF, OBJECT_MATERIAL_TEXT_ALIGN_CENTER); UpdateLabelBillboard(i); } } } } return 1; }
  14. salut, Dupa ce cumpar masina din Dealership nu mai functioneaza comanda /v(ehicles). Video: Watch bandicam 2026-02-15 15-44-54-707 | Streamable
  15. salutare, Caut un scripter sa ma ajute la un gamemode, platesc
  16. salut, mai este valabil anuntul ??
  17. salut, ma poti ajuta si pe mine la o problema? Nu imi afiseaza dialog-ul cu membrii din clan
  18. salutare, Am si eu o problema la dialog-ul members, nu afiseaza membrii. Uitati codul mai jos: case 1: { new szDialog2[1024], Members, name[180], cwarn[180], cdays[180], szRank1[180]; format(query, sizeof(query), "SELECT * FROM `users` WHERE `users`.`Clan` = '%d' ORDER BY `users`.`ClanRank` DESC LIMIT 50", PlayerInfo[playerid][pClan]); new Cache: result = mysql_query(SQL, query); strcat(szDialog2, "#. Name\tRank\tClan Warns\tClan Days\n"); for(new i, j = cache_get_row_count (); i != j; ++i) { cache_get_field_content(i, "Username", name); cache_get_field_content(i, "ClanRank", szRank1); cache_get_field_content(i, "ClanWarns", cwarn); cache_get_field_content(i, "ClanDays", cdays); format(Selected[playerid][Members], MAX_PLAYER_NAME, name); format(szDialog, sizeof(szDialog), "%d. %s\t%d\t%s/3\t%s\n", Members+1, name, strval(szRank1), cwarn, cdays); strcat(szDialog2, szDialog); Members++; } cache_delete(result); ShowPlayerDialog(playerid, DIALOG_CLAN_MEMBERS, DIALOG_STYLE_TABLIST_HEADERS, "Clan members", szDialog2, "Ok", "Back"); }
  19. cauta dupa variabila pAdmin sau cum o ai tu definita in gamemode.
  20. Am pus, Cand ma loghez imi arata asta: sa mp 007 — Postimages fara sa ma spawneze
  21. mersi mult mane pentru ajutor!
  22. case DIALOG_BUYCAR: { if(!response) return 1; new num = BuyCar[playerid]; if(PlayerInfo[playerid][pCashMoney] >= DSInfo[num][dsPrice]) { if(DSInfo[num][dsStock] > 0) { GiveVehicle(playerid, num); DSInfo[num][dsStock] --; mysql_format(SQL, query, sizeof(query), "UPDATE `dealership` SET `Stock`='%d' WHERE `ID`='%d'", DSInfo[num][dsStock], num); mysql_tquery(SQL, query, "", ""); } else { new stringg[1000]; format(stringg,sizeof(stringg),"Aceasta masina numai este disponibila in Dealership. Stoc epuizat.\nYou can't buy this vehicle from the dealership. Out of stock."); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "Out of stock", stringg, "Close",""); } } else return SendClientMessage(playerid, COLOR_GREY, "You don't have enough money to purchase this vehicle."); }
  23. E problema de la "new num = listitem + cheapcars + 1;
  24. case 1: { new szDialog2[1024], szTitle[50], xx; strcat(szDialog2, "Vehicle Name\tPrice\tStock\n"); for(new j = 0; j < MAX_PERSONAL_VEH; j++) { if(DSInfo[j][dsPrice] > 45000 && DSInfo[j][dsPrice] <= 1500000) { format(szDialog, sizeof(szDialog), "%s\t$%s\t%d\n", DSInfo[j][dsVehicleName], FormatNumber(DSInfo[j][dsPrice]), DSInfo[j][dsStock]); strcat(szDialog2, szDialog); xx++; } } format(szTitle, sizeof(szTitle), "Expensive Vehicles: %d", xx); ShowPlayerDialog(playerid, DIALOG_DEALERSHIP2, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Select", "Close"); } case DIALOG_DEALERSHIP2: { if(!response) return 1; new cheapcars; for(new xf = 0; xf < MAX_PERSONAL_VEH; xf++) { if(DSInfo[xf][dsPrice] > 0 && DSInfo[xf][dsPrice] <= 1500000) { cheapcars = xf; } } // new num = listitem + cheapcars + 1; new num = listitem + 2; BuyCar[playerid] = num; new string33[256], stringtitle[256]; format(stringtitle, sizeof(stringtitle), "%s ($%s) - %s available", DSInfo[num][dsVehicleName], FormatNumber(DSInfo[num][dsPrice]), FormatNumber(DSInfo[num][dsStock])); format(string33, sizeof(string33), "Vehicle name: %s\nVehicle price: %s\nNumber of cars available: %s", DSInfo[num][dsVehicleName], FormatNumber(DSInfo[num][dsPrice]), FormatNumber(DSInfo[num][dsStock])); ShowPlayerDialog(playerid, DIALOG_BUYCAR, DIALOG_STYLE_MSGBOX, stringtitle, string33, "Buy car", "Back"); }
  25. salut, cine ma poate ajuta si pe mine? Nu afiseaza ID-ul masinii corect la Expensive Vehicles
×
×
  • 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.