Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. You could still use the code I've posted above, but you would need to add the guiSetText for the labels you would like to change.
  2. Oh, I misread your code. You were checking if the text is -1 not if the selected row is -1. Try my code again.
  3. Screaming It Out ABC
  4. Jaysds1

    Modules

    No Problem. Plus no one really knows what servers uses Modules. Personally, I think some of the popular servers uses at least 1 Module. But it's up to you, you could build a Module and probably make it useful on your server.
  5. Try this: for _,v in ipairs(getElementsByType("player"))do local row = guiGridListAddRow(GUIEditor.gridlist[1]) local playerName = getPlayerName(v) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,playerName,false,false) end addEventHandler("onClientGUIClick",GUIEditor.gridlist[1], function(b) if b ~= "left" then return end local row,column = guiGridListGetSelectedItem(source) if row == -1 then return end local playerName = guiGridListGetItemText(GUIEditor.gridlist[1],row,column) local player = getPlayerFromName(playerName) if not playerName then guiGridListRemoveRow(row) return end local playerHealth = getElementHealth(player) local playerArmour = getPedArmor(player) end end,false)
  6. Jaysds1

    Modules

    With Modules, you could implement anything you want into your MTA Server using C++. There's not really any tutorial's based on how to develop modules, but you could download one from the MTA Wiki Modules page and see how they work.
  7. If you want to set a text on the client-side, you should be triggering over to the client-side event. try this: --Client function createwindow() if not guiGetVisible ( window1 ) then local playerTeam = getPlayerTeam ( localPlayer ) if getTeamName(playerTeam) == "Police" then guiSetVisible (window1, true) triggerServerEvent ( "setarrests", localPlayer, playerTeam) end else guiSetVisible (window1, false) end end addCommandHandler ( "pcomp", createwindow ) addEvent("getArrestData",true) function getArrestData(data) guiSetText ( arrests_lab2, data ) end addEventHandler("getArrestData",root,getArrestData) --Server function getdatas() local theAccount = getPlayerAccount ( source ) local getdata = getAccountData(theAccount, "Arrests.count") or "0" triggerClientEvent(client,"getArrestData",client,tostring(getdata)) end addEvent("setarrests", true) addEventHandler("setarrests", root, getdatas)
  8. it's because the event handler is linked to the window, the source would always be the window and the event would only trigger if you click on the window. Try this: addEventHandler("onClientGUIClick",guiRoot,function(b) if b ~= "left" then return end if source == GUIEditor.button[2] then guiSetVisible(GUIEditor.window[1],false) showCursor(false) elseif source == GUIEditor.button[1] then local row,column = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local SelectedSkin = guiGridListGetItemText ( GUIEditor.gridlist[1],row , 1 ) if row == -1 then exports["TopBarChat"]:sendClientMessage ("#0000FF* #FF0000You must select a skin first !",255,255,255,true) return end if getElementModel(localPlayer) ~= tonumber(SelectedSkin) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) triggerServerEvent("onBuy",localPlayer,tonumber(SelectedSkin)) else exports["TopBarChat"]:sendClientMessage ("#0000FF* #FF0000You already have that skin !",255,255,255,true) end end end)
  9. EEA - Eastern Europe Anal BBC
  10. OOU - Owner Of Unisex WBB
  11. WLL - We Lust Lover MOB
  12. You do know you could search for it on google? https://google.ca
  13. How do we know that you're from Everest Community?
  14. Jaysds1

    Info!

    You could script this yourself, just read more about how to script on the MTA Wiki https://wiki.multitheftauto.com
  15. Jaysds1

    Causes of Lagg

    Well, is it only you getting the lag or is it most of the players?
  16. Oh, I know how you feel about work and I wish I could help but I'm currently working on other projects of my own , plus I would need to download a program for C++ to continue learning more about it.
  17. Ya, it seems nice, but it has too much flickers and the texts go by fast at the end.
×
×
  • Create New...