Jump to content

WhoAmI

Members
  • Posts

    1,248
  • Joined

  • Last visited

Everything posted by WhoAmI

  1. Jak będziesz zarabiać to chcę 3% akcji. Pozdrawiam.
  2. GUIEditor = { button = {}, window = {}, memo = {} } function pokaziphone() GUIEditor.staticimage[1] = guiCreateStaticImage(499, 170, 163, 375, "pobrane.png", false) GUIEditor.staticimage[2] = guiCreateStaticImage(10, 51, 143, 273, "images.png", false, GUIEditor.staticimage[1]) klawiatura = guiCreateStaticImage(3, 228, 47, 41, "klawiatura.png", false, GUIEditor.staticimage[2]) GUIEditor.staticimage[4] = guiCreateStaticImage(82, 225, 45, 44, "menu.png", false, GUIEditor.staticimage[2]) GUIEditor.button[3] = guiCreateButton(61, 329, 39, 36, "", false, GUIEditor.staticimage[1]) showCursor(true) end function wlaczklawiature() GUIEditor.window[1] = guiCreateWindow(509, 220, 143, 277, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(9, 21, 124, 84, "", false, GUIEditor.window[1]) jeden = guiCreateButton(19, 121, 27, 26, "1", false, GUIEditor.window[1]) dwa = guiCreateButton(56, 121, 28, 26, "2", false, GUIEditor.window[1]) trzy = guiCreateButton(94, 121, 29, 26, "3", false, GUIEditor.window[1]) cztery = guiCreateButton(19, 160, 27, 28, "4", false, GUIEditor.window[1]) piec = guiCreateButton(57, 160, 27, 28, "5", false, GUIEditor.window[1]) szesc = guiCreateButton(96, 161, 27, 27, "6", false, GUIEditor.window[1]) siedem = guiCreateButton(20, 198, 27, 31, "7", false, GUIEditor.window[1]) osiem = guiCreateButton(56, 198, 30, 31, "8", false, GUIEditor.window[1]) dziewiec = guiCreateButton(96, 198, 28, 31, "9", false, GUIEditor.window[1]) zero = guiCreateButton(57, 243, 27, 24, "0", false, GUIEditor.window[1]) szachownica = guiCreateButton(21, 240, 26, 27, "#", false, GUIEditor.window[1]) gwiazdka = guiCreateButton(97, 242, 27, 25, "*", false, GUIEditor.window[1]) end addEventHandler ( "onClientGUIClick", guiRoot, function () if ( getElementType ( source ) == "gui-button" ) then local t = guiGetText ( source ) local c_t = guiGetText ( GUIEditor.memo[1] ) local s_t = c_t .. t guiSetText ( GUIEditor.memo[1], string.gsub ( s_t, "\n", "" ) ) end end ) addCommandHandler("wlaczklawiature", wlaczklawiature) Dziwny błąd, ale udało mi się naprawić.
  3. local t = guiGetText ( source ) Jest zdefiniowana.
  4. A i spróbuj dać szersze to memo, bo to niemożliwe, żeby pionowo się robiły. Pokaż swój cały kod.
  5. Przeanalizuj jeszcze cały kod i spróbuj wyszukać błędu.
  6. Use yum install Instead of apt-get install
  7. Dziwne. A tak? addEventHandler ( "onClientGUIClick", guiRoot, function () if ( getElementType ( source ) == "gui-button" ) then local t = guiGetText ( source ) local c_t = guiGetText ( GUIEditor.memo[1] ) local s_t = c_t .. "" .. t guiSetText ( GUIEditor.memo[1], s_t ) end end )
  8. Cześć. Uploduje tu prywatny system aut. Posiada: - zapis pojazdu w ostatniej pozycji, koloru i upgrade'ów - zapis do SQL/MySQL - pełną konfiguracje - panel tworzenia auta pod 'Z' albo /privatecars Zexportowane funkcje: createPrivateVehicle ( int model, int x, int y, int z, int rotX, int rotY, int rotZ, table color, table upgrades, string accName ) tablica kolorów powinna wyglądać { r, g, b, r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 } isCarPrivate ( element vehicle ) getPrivateCarOwner ( element vehicle ) Wszystkie funkcje po stronie serwera. Wbudowane komendy: /carinfo Zdjęcia: http://imgur.com/sMiYSLj,UpFjofz,mu5wL58 Plik konfiguracyjny Download https://community.multitheftauto.com/index.php?p= ... s&id=11268 Skrypt jest po angielsku. Błędy proszę zgłaszać. Powodzenia.
  9. addEventHandler ( "onClientGUIClick", guiRoot, function () if ( getElementType ( source ) == "gui-button" ) then local t = guiGetText ( source ) local c_t = guiGetText ( GUIEditor.memo[1] ) local s_t = c_t .. t guiSetText ( GUIEditor.memo[1], s_t ) end end ) Tyle wystarczy i powinno działać dla wszystkich buttonów.
  10. Well, your code in 1st post should work. Make sure that script in meta is client and check debugscript 3.
  11. function enableVehicleControl() if isPedInVehicle ( localPlayer ) then guiSetVisible( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) ) showCursor( not isCursorShowing ( ) ) end end
  12. Check this function createPlayerList () -- Create the grid list playerList = guiCreateGridList ( 0.80, 0.10, 0.15, 0.60, true ) -- Create a players column in the list local column = guiGridListAddColumn( playerList, "Player", 0.85 ) if ( column ) then -- If the column has been created, fill it with players for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end end --addEventHandler ( "onClientResourceStart", getRootElement(), createPlayerList ) --handle the player click when he clicks on a gridlist item function click ( button, state, sx, sy, x, y, z, elem, gui ) -- if state is down ( not to trigger the function twice on mouse button up/down), clicked gui and the element is our player list if ( ( state == "down" ) and ( gui == true ) and ( source == playerList ) ) then -- get the player name from the selected row, first column local playerName = guiGridListGetItemText ( playerList, guiGridListGetSelectedItem ( playerList ), 1 ) outputChatBox ( playerName ) -- output it to chat box end end addEventHandler ( "onClientGUIClick", playerList, click ) --This function is called when we start the client addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function () -- create the log in window and its components createPlayerList () -- enable the players cursor (so they can select and click on the components) showCursor(true) -- set the input focus onto the GUI, allowing players (for example) to press 'T' without the chatbox opening guiSetInputEnabled(true) end )
  13. Hello. Today i'm releasing a resource which I made today called 'Private cars'. It's private cars system which saves car to player's account. Features: - saving last position, color and upgrades before script is restarted - save to SQL/MySQL - fully configurable - creation panel if you hit 'Z' key or type /privatecars Thre are some exported functions: createPrivateVehicle ( int model, int x, int y, int z, int rotX, int rotY, int rotZ, table color, table upgrades, string accName ) table color should looks like { r, g, b, r1, g1, b1, r2, g2, b2, r3, g3, b3, r4, g4, b4 } Returns vehicle element if succesfully, false otherwise. isCarPrivate ( element vehicle ) Returns true if car is private, false otherwise. getPrivateCarOwner ( element vehicle ) Returns owner's account name, false otherwise. All functions are serverside. There are some built-in commands: /carinfo There are some screenshots: http://imgur.com/sMiYSLj,UpFjofz,mu5wL58 Configuration file Download https://community.multitheftauto.com/index.php?p= ... s&id=11268 I didn't test everything propperly, so there may be some bugs, but report it to me. Have fun!
  14. You have to get all skin's picture, put it on the folder and named them with skin id, and then addEventHandler ( "onClientRender", root, function ( ) dxDrawImage ( posX, posY, width, height, "images/" .. getElementModel ( localPlayer ) .. ".png" ) end )
  15. So do auto respawn for example each hour.
  16. I prefer creating a command which would save car with account's name into SQL. And the when resource starts, looping all rows in database and creating vehicle with setting data to them with account's name.
  17. ovh is good one, got server there from France. I don't have any problems.
×
×
  • Create New...