Jump to content

MIKI785

Members
  • Posts

    1,131
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by MIKI785

  1. You have to learn... visit: https://wiki.multitheftauto.com/wiki/In ... ng_the_GUI
  2. All objects are elements, excluding world objects. You can delete them using destroyElement.
  3. Well, I hope that 1.4 will be soon, because this function client sided is just amazing!
  4. What exactly do you want? Lots of things can be found on community: https://community.multitheftauto.com
  5. MIKI785

    Database

    What do you mean? MTA contains built-in account system, use command login to login (or function logIn), admin resource contains command register. To create new account via script, use function addAccount. If you want to save data to accounts use: setAccountData getAccountData
  6. Hi, i didn't know where to post it so i posted it here. A few months earlier I presented this application here, now I'm presenting its v2. What does this application do? Simple resource creation for your map You can simply add music to your map You can change the sky and water color All by just a few clicks. What is new in v2? To choose sky/water color, color picker opens and you choose your color. RGB no longer needed. You can add custom messages at the start of your map, you can include HEX codes. Deleted message about Admin rights at start. (Because they're not really needed) Screenshots: Custom messages dialog: Color picker: You can download it here: Download
  7. Well, you can use object ID just make loop. for i, object in ipairs(getElementsByType("object")) do if getElementModel(object) == 3091 then setObjectBreakable(object, true) end end
  8. Try this: GUIEditor = { tab = {}, tabpanel = {}, edit = {}, button = {}, window = {}, label = {}, checkbox = {} } function initializeBankPanel () GUIEditor.window[1] = guiCreateWindow(541, 262, 314, 226, "National Bank of San Andreas", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 21, 295, 196, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Deposit", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(20, 19, 61, 15, "Amount: $", false, GUIEditor.tab[1]) GUIEditor.edit[1] = guiCreateEdit(85, 14, 182, 26, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(88, 100, 124, 38, "Proceed", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(20, 56, 247, 15, "Your balance: $", false, GUIEditor.tab[1]) GUIEditor.tab[2] = guiCreateTab("Withdraw", GUIEditor.tabpanel[1]) GUIEditor.label[3] = guiCreateLabel(20, 19, 61, 15, "Amount: $", false, GUIEditor.tab[2]) GUIEditor.edit[2] = guiCreateEdit(85, 14, 182, 26, "", false, GUIEditor.tab[2]) GUIEditor.label[4] = guiCreateLabel(20, 56, 248, 15, "Your balance: $", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(88, 100, 124, 38, "Proceed", false, GUIEditor.tab[2]) GUIEditor.tab[3] = guiCreateTab("Transfer", GUIEditor.tabpanel[1]) GUIEditor.label[5] = guiCreateLabel(20, 19, 61, 15, "Username:", false, GUIEditor.tab[3]) GUIEditor.label[6] = guiCreateLabel(20, 52, 61, 15, "Amount: $", false, GUIEditor.tab[3]) GUIEditor.label[7] = guiCreateLabel(20, 88, 247, 15, "Your balance: $", false, GUIEditor.tab[3]) GUIEditor.edit[3] = guiCreateEdit(85, 14, 182, 26, "", false, GUIEditor.tab[3]) GUIEditor.edit[4] = guiCreateEdit(85, 50, 182, 26, "", false, GUIEditor.tab[3]) GUIEditor.checkbox[1] = guiCreateCheckBox(270, 20, 15, 15, "", false, false, GUIEditor.tab[3]) GUIEditor.checkbox[2] = guiCreateCheckBox(270, 55, 15, 15, "", false, false, GUIEditor.tab[3]) GUIEditor.button[3] = guiCreateButton(88, 120, 124, 38, "Proceed", false, GUIEditor.tab[3]) end bindKey ( "]", "down", function () if isElement(GUIEditor.window[1]) then destroyElement(GUIEditor.window[1]) showCursor(false) guiSetInputEnabled(false) else initializeBankPanel() showCursor(true) guiSetInputEnabled(true) end end ) player = getLocalPlayer ( ) gettab = getSelectedTab ( GUIEditor.tabpanel[1] ) function controlBankPanel ( ) if not isElement ( GUIEditor.window[1] ) then initializeBankPanel () end if not guiGetVisible ( GUIEditor.window[1] ) then showBankPanel ( ) else closeBankPanel ( ) end end function updateBalance () guiSetText ( GUIEditor.label[2], "Your balance: $"..getElementData ( getLocalPlayer () ).."" ) guiSetText ( GUIEditor.label[4], "Your balance: $"..getElementData ( getLocalPlayer () ).."" ) guiSetText ( GUIEditor.label[7], "Your balance: $"..getElementData ( getLocalPlayer () ).."" ) end function showBankPanel () guiSetVisible ( GUIEditor.window[1], true ) showCursor ( true ) guiSetInputEnabled ( true ) updateBalance ( ) end function closeBankPanel() guiSetVisible ( GUIEditor.window[1], false ) showCursor ( false ) guiSetInputEnabled ( false ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], deposit, false) addEventHandler("onClientGUIClick", GUIEditor.button[2], withdraw, false) addEventHandler("onClientGUIClick", GUIEditor.button[3], transfer, false) addEventHandler("onClientGUITabSwitched", getRootElement ( ), updateBalance, false) addEvent("showBankPanel", true) addEvent("closeBankPanel", true) addEventHandler("showBankPanel", getRootElement(), showBankPanel) addEventHandler("closeBankPanel", getRootElement(), closeBankPanel)
  9. Do you get any warnings/errors? That would help.
  10. MIKI785

    isPedBlood ?

    onClientDamage is what you want? When a player is hit this event is triggered. Also server side onPlayerDamage is triggered.
  11. MIKI785

    Fade as hide

    Simple solution: Stop copying FFS and make your own.
  12. That should work, you just have no "player" variable declared, use source instead.
  13. MIKI785

    Player Money

    You mean that you want to retrieve the money of another player and show it in GUI? That can't be done using getPlayerMoney. This function can't get money of remote player if client sided. So make server side script which will save player's money into element data and this can be retrieved on client side.
  14. Try making the script client side if it's server side and remove the model at the resource's start. (That is when player joins if client sided)
  15. MIKI785

    Recording maps

    I don't think this is the right section, this is supposed to be showroom. And you didn't post any info, so i doubt that someone will contact you.
  16. Nice, good job releasing it. But you could have made the GUI little bit smaller, there's too much unused space.
  17. I suppose that it's this resource: https://community.multitheftauto.com/index.php?p= ... ls&id=6436, just stop editing other people's work O_o. All you need to do is to edit DB details in order to use it...
  18. Sasuke, still wrong There's another ' @ line 35
  19. He doesn't want it client side, because he's using server side event... think... You're trying to compare function with number... just add () to call the getPlayerCount. So it will be getPlayerCount()
  20. There are no errors/warnings? local pickup = createPickup ( x, y, z, 2, currentweapon, 50, totalammo ) You got respawn set at 50ms, that's a little bit low, don't you think? If you want the weapon to be spawned only once, use 60000 as your timeout is.
  21. Harlem Shake's everywhere now Good Job.
×
×
  • Create New...