Jump to content

-.Paradox.-

Members
  • Posts

    1,239
  • Joined

  • Last visited

Everything posted by -.Paradox.-

  1. Can't understand It's the XP system that you helped me with
  2. -.Paradox.-

    Question

    Hello I'm asking how to change colt-45 animation style I meant like changing the aiming style to deagle's one thanks for helping
  3. Hello I want a little help, I have a ranking system with levels and I want use if player level is 1 then draw an image "lvl_1.png" and if player level is 0 then draw "lvl_0.png" can somebody suggest to me what I could use for that and thanks
  4. If the player is in vehicle and he hit another player in foot he die instantly that what I'm trying to make
  5. Hello, I need some functions to create a script like example if player hit another player with vehicle he instantly die like real life :3 thanks for helping
  6. Working but I want player can use /lock outside the vehicle and when player have to type /unlock to unlock the vehicle
  7. But you can redirect to other server with ip and port
  8. Ok gonna try tomorrow thanks for helping I will tell you if there is some errors
  9. addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[1] then 4. local row = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) if row == 0 then triggerServerEvent ("shopBuy", localPlayer) elseif row == 1 then triggerServerEvent ("setMyArmor", localPlayer) end end end ) Like that sorry for bad code because i made it in phone
  10. --Client Side addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[1] then local row = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if row == 0 then setElementHealth(source,200) elseif row == 1 then triggerServerEvent("setMyArmor", localPlayer) end end end ) --Server Side addEvent ("shopBuy", true) addEventHandler ("shopBuy", getRootElement(), function() if (getPlayerMoney (source) >= tonumber(1000)) then takePlayerMoney (source, tonumber (1000)) setElementHealth(source,200) else outputChatBox ("You are too poor!", source, 255, 0, 0, false) end end) That what i tried in server side
  11. Please read my last post i show you what i've done
  12. Thank you, and if i wan t to use takePlayerMoney what i must use? That what i tried but it set health but dont take money from player addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[1] then local row = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if row == 0 then if (getPlayerMoney (source) >= 1000) then takePlayerMoney (source, tonumber(1000)) setElementHealth(source,200) elseif row == 1 then triggerServerEvent("setMyArmor", localPlayer) end end end end)
  13. Okay, but i don't know how to trigger that function to server side, can you do it to me please?
  14. Alright i tried this it's working fine but when i select armor and i click in Buy stuff it output in debug ERROR:Shops/c_gui.lua:58:attempt to call global 'setElementArmor' (a nil value) here is the code GUIEditor = { tab = {}, tabpanel = {}, button = {}, window = {}, gridlist = {} } GUIEditor.window[1] = guiCreateWindow(0.41, 0.33, 0.25, 0.42, "Health and Armor shop", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 17, 319, 253, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Shop", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(8, 5, 304, 167, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Shop", 0.4) guiGridListAddColumn(GUIEditor.gridlist[1], "$", 0.4) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Health", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "1000$", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Armor", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "1000$", false, false) GUIEditor.button[1] = guiCreateButton(94, 174, 121, 44, "Buy Stuff", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(99, 273, 136, 36, "Close Shop", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiSetVisible(GUIEditor.window[1], false) showCursor(false) function enableShop() if guiGetVisible(GUIEditor.window[1]) == false then guiSetVisible(GUIEditor.window[1], true) showCursor(true) else guiSetVisible(GUIEditor.window[1], false) showCursor(false) end end addCommandHandler("shop", enableShop) function closeButton() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addEventHandler ( "onClientGUIClick", GUIEditor.button[2], closeButton, false ) addEventHandler("onClientGUIClick", guiRoot, function() if source == GUIEditor.button[1] then local row = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) if row == 0 then setElementHealth(source, 200) elseif row == 1 then setElementArmor(source,100) end end end)
  15. Ok thanks gonna try but i saw that too when i open window setting i saw Column called "copy" i tough it will output the code but it just copied the oanel to create another one thanks again
  16. Yes, I understand but how I can set text of the rows and when player click in first row it take 1000$ from player cash and setElementHealth to max thanks for helping. Shop $ _________________ Health 1000$ Armor 1000$ That's the rows I want set text for it.
  17. Hello ,I have a gui bug can somebody fix it please thanks for help GUIEditor = { tab = {}, tabpanel = {}, button = {}, window = {}, gridlist = {} } GUIEditor.window[1] = guiCreateWindow(0.41, 0.33, 0.25, 0.42, "Health and Armor shop", true) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 17, 319, 253, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Shop", GUIEditor.tabpanel[1]) GUIEditor.gridlist[1] = guiCreateGridList(8, 5, 304, 167, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Shop", 0.4) guiGridListAddColumn(GUIEditor.gridlist[1], "$", 0.4) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 2, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 2, "-", false, false) GUIEditor.button[1] = guiCreateButton(94, 174, 121, 44, "Buy Stuff", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[2] = guiCreateGridList(8, 5, 304, 167, false, GUIEditor.tab[1]) guiGridListAddColumn(GUIEditor.gridlist[2], "Shop", 0.4) guiGridListAddColumn(GUIEditor.gridlist[2], "$", 0.4) for i = 1, 2 do guiGridListAddRow(GUIEditor.gridlist[2]) end guiGridListSetItemText(GUIEditor.gridlist[2], 0, 1, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 0, 2, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 1, "-", false, false) guiGridListSetItemText(GUIEditor.gridlist[2], 1, 2, "-", false, false) GUIEditor.button[2] = guiCreateButton(99, 273, 136, 36, "Close Shop", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") guiSetVisible(GUIEditor.Window[1], false) showCursor(false) function enableShop() if guiGetVisible(GUIEditor.Window[1]) == false then guiSetVisible(GUIEditor.Window[1], true) showCursor(true) else guiSetVisible(GUIEditor.Window[1], false) showCursor(false) end end addCommandHandler("shop", enableShop) function closeButton() guiSetVisible(GUIEditor.Window[1], false) showCursor(false) end addEventHandler ( "onClientGUIClick", GUIEditor.Button[2], closeButton, false ) I want when player click on the first row sethealth to 100 and second row setarmor to 100 Errors in debug ERROR: Shops/c_gui.lua:41:attempt to index field 'Window' (a nil value) thanks for help
×
×
  • Create New...