Jump to content

Jaysds1

Members
  • Posts

    4,961
  • Joined

  • Last visited

Everything posted by Jaysds1

  1. Jaysds1

    Login GUI

    I said was wasn't finish.
  2. Did you stop the server first? If you didn't then it won't change.
  3. what do you mean about quene? Do you mean when you add an Object, it won't be in the server yet?
  4. Jaysds1

    Login GUI

    ya, I was planing on fixing that.
  5. Jaysds1

    Microphone

    There is no stand up microphone, the one in Mad Dogg's Studio is part of the interior/material.
  6. So there is nothing wrong anymore?
  7. oooh nevermind, I misread then, anyways, your welcome
  8. Nice, How do you put your picture in the map/server?
  9. So do you want the resource or are you looking for KWKSND?
  10. because if the player is not in the vehicle and he presses it then it doesn't trigger anything.
  11. Jaysds1

    MTA Server HELP

    ok, download the latest MTA Program then go to (MTA San Andreas/Server/mods/deathmatch/) then open ACL.xml, go to and add (user.YOURUSERNAME) between and
  12. you can't just put that, you have to put: addEventHandler ( "onPlayerJoin", getRootElement(), function() bindKey (keyPresser, "l", "down", VehicleLights ) end) addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), function() for index, player in pairs(getElementsByType("player")) do unbindKey (keyPresser, "l", "down", VehicleLights ) end end) So when the player joins they could press the button.
  13. Jaysds1

    Login GUI

    THAT IS A WASTE!!!
  14. Jaysds1

    Login GUI

    a guy asked me to create a login GUI for him and he gave me the background IT 'S NOT STOLEN!!! here is the PROOF:
  15. Jaysds1

    Login GUI

    This Login GUI has a: - Register GUI - Nickname GUI to change your nickname if you want to or if you have siblings, - Background image ( you could add your own image ) - Coming Soon UPDATE GUI! Here is the link: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2247 IMAGES:
  16. Jaysds1

    Problems

    Why isn't my Gui checking for Updates? Client-side: local checking_updates = false addEvent ( "update",true) addEventHandler ( "update", getRootElement(getThisResource()), function() sx,sy = guiGetScreenSize() jupdateWindow = guiCreateWindow((sx/2)-109,(sy/2)-74,218,148,"J UPDATE",false) jupdateVersionLabel = guiCreateLabel(11,23,196,18,"J Login Version x.x.x",false,jupdateWindow) guiLabelSetHorizontalAlign(jupdateVersionLabel,"center",true) jUpdateButton = guiCreateButton(41,79,136,25,"Check for Updates",false,jupdateWindow) jUpdateLabel = guiCreateLabel(11,45,196,33,"Update Status: unknown",false,jupdateWindow) guiLabelSetHorizontalAlign(jUpdateLabel,"center",true) jUpdateCheckbox = guiCreateCheckBox(9,116,200,18,"Check for updates automaticly",false,false,jupdateWindow) addEventHandler("onClientGUIClick",jupdateWindow,function(button,state) if button == "left" and state == "up" then if source ~= jUpdateButton and source ~= jUpdateCheckbox then hideWindow() checking_updates = false elseif source == jUpdateButton then checking_updates = true triggerServerEvent("checkUpdateStatus",getLocalPlayer(),true) guiSetText(jUpdateLabel,"Checking...") end end guiWindowSetSizable(jupdateWindow,false) setElementData(jupdateWindow,"cant_edit",true) setElementData(jupdateVersionLabel,"cant_edit",true) setElementData(jUpdateButton,"cant_edit",true) setElementData(jUpdateLabel,"cant_edit",true) setElementData(jUpdateCheckbox,"cant_edit",true) setElementData(jupdateVersionLabel,"cant_highlight",true) setElementData(jUpdateLabel,"cant_highlight",true) setElementData(jUpdateCheckbox,"cant_highlight",true) guiSetVisible(jupdateWindow,false) end) end) function hideWindow() guiSetVisible(jupdateWindow,false) settings.jupdate_update_check.value = guiCheckBoxGetSelected(jUpdateCheckbox) saveSettingsFile() end addEvent("receiveUpdateCheck",true) addEventHandler("receiveUpdateCheck",getRootElement(),function(update,newVersion,oldVersion,manual) if checking_updates then if update then guiSetText(jUpdateLabel,"An update is available! (v. "..tostring(newVersion)..")") if manual == false then if not jupdate_version then jupdate_version = oldVersion end showWindow() end elseif update == false then guiSetText(jUpdateLabel,"No updates available") else guiSetText(jUpdateLabel,"Error: Check ACL permissions and MTA website availability.") end end end) function showWindow() guiSetText(jUpdateLabel,"GUI Editor Version "..tostring(jupdate_version)) guiCheckBoxSetSelected(jUpdateCheckbox,settings.jupdate_update_check.value) guiSetVisible(jupdateWindow,true) guiBringToFront(jupdateWindow) end Server-side function checkForUpdates(manual) local player = client local called = callRemote("https://community.multitheftauto.com/mta/resources.php",function(n,v) updateResult(n,v,player,manual) end,"version",string.lower(getResourceName(getThisResource()))) if not called then -- outputChatBox("Error: Check ACL permissions and website availability.") triggerClientEvent(client,"receiveUpdateCheck",client,nil) end end addEvent("checkUpdateStatus",true) addEventHandler("checkUpdateStatus",root,checkForUpdates) function updateResult(name,version,player,manual) local update = false if string.lower(name):find("error") or version == 0 then update = nil end if update == false then local v1,v2,v3 = parseVersion(tostring(version)) local cv1,cv2,cv3 = parseVersion(tostring(getResourceInfo(getThisResource(),"version"))) if v1 and cv1 then if v1 > cv1 then update = true elseif v2 > cv2 then update = true elseif v3 > cv3 then update = true end end end triggerClientEvent(player,"receiveUpdateCheck",player,update,version,tostring(getResourceInfo(getThisResource(),"version")),manual) end function parseVersion(version) local parts = split(version,string.byte(".")) return parts[1],parts[2],parts[3] end Settings File: settings = {} settings.gui = {} settings.jupdate_update_check = {value = false, type = "boolean"} function saveSettingsFile() local file = xmlLoadFile("settings.xml") if not file then file = xmlCreateFile("settings.xml","settings") if file then outputDebugString("Created GUI Editor settings file successfully.") else outputDebugString("Could not create GUI Editor settings file.") return end end for name,setting in pairs(settings) do if setting and setting ~= settings.gui then local node = getChild(file,tostring(name),0) if node then xmlNodeSetValue(node,tostring(setting.value)) else outputDebugString("Failed to save GUI Editor '"..tostring(name).."' setting.") end end end xmlSaveFile(file) xmlUnloadFile(file) return end function loadSettingsFile() local file = xmlLoadFile("settings.xml") if not file then outputDebugString("Couldnt find GUI Editor settings file. Creating...") saveSettingsFile(false) return end for i,node in ipairs(xmlNodeGetChildren(file)) do local value = xmlNodeGetValue(node) if value then local name = xmlNodeGetName(node) -- silly side effect of having shitty settings to begin with -- redirect deprecated names onto their new counterparts name = checkOutdatedNodes(node) local formatted = formatValue(value,name) if formatted ~= nil then settings[name].value = formatted -- outputDebugString("Loaded GUI Editor '"..name.."' setting. ("..tostring(formatted)..")") else outputDebugString("Failed to load GUI Editor '"..name.."' setting. Using default...") end end end xmlSaveFile(file) xmlUnloadFile(file) return end function checkOutdatedNodes(node) local name = xmlNodeGetName(node) if name == "updatecheck" then xmlDestroyNode(node) outputDebugString("Destroyed deprecated J Update settings node '"..name.."'.") return "jupdate_update_check" end return name end
  17. Jaysds1

    Problems

    I have a problem with my update Gui, every time when I press the leave button on the nick GUI the update GUI is suppose to appear but it doesn't appear. Here is my script Client-side function DONE() -- hide the gui, hide the cursor and return control to the player guiSetVisible(GUIEditor_Window[2], false) guiSetVisible(GUIEditor_Window[1], false) guiSetVisible(GUIEditor_Window[3], false) --guiSetVisible(back_Ground, false) showCursor(false) guiSetInputEnabled(false) triggerServerEvent ( "checker", getRootElement()) --HERE IS THE TRIGGER end addEvent("Done",true) addEventHandler("Done", getRootElement(), DONE) now Server-side addEvent ( "checker",true) addEventHandler ( "checker", getRootElement(), function(player) local account = getPlayerAccount(player) if not account then return end local accountName = getAccountName(account) if isObjectInACLGroup ( "user." .. accountName, aclGetGroup ( "Admin" ) ) then triggerClientEvent ( "update",getRootElement()) end end) then back to Client-side local checking_updates = false addEvent ( "update",true) addEventHandler ( "update", getRootElement(getThisResource()), function() sx,sy = guiGetScreenSize() jupdateWindow = guiCreateWindow((sx/2)-109,(sy/2)-74,218,148,"J UPDATE",false) jupdateVersionLabel = guiCreateLabel(11,23,196,18,"J Login Version x.x.x",false,jupdateWindow) guiLabelSetHorizontalAlign(jupdateVersionLabel,"center",true) jUpdateButton = guiCreateButton(41,79,136,25,"Check for Updates",false,jupdateWindow) jUpdateLabel = guiCreateLabel(11,45,196,33,"Update Status: unknown",false,jupdateWindow) guiLabelSetHorizontalAlign(jUpdateLabel,"center",true) jUpdateCheckbox = guiCreateCheckBox(9,116,200,18,"Check for updates automaticly",false,false,jupdateWindow) addEventHandler("onClientGUIClick",jupdateWindow,function(button,state) if button == "left" and state == "up" then if source ~= jUpdateButton and source ~= jUpdateCheckbox then hideWindow() checking_updates = false elseif source == jUpdateButton then checking_updates = true triggerServerEvent("checkUpdateStatus",getLocalPlayer(),true) guiSetText(jUpdateLabel,"Checking...") end end guiWindowSetSizable(jupdateWindow,false) setElementData(jupdateWindow,"cant_edit",true) setElementData(jupdateVersionLabel,"cant_edit",true) setElementData(jUpdateButton,"cant_edit",true) setElementData(jUpdateLabel,"cant_edit",true) setElementData(jUpdateCheckbox,"cant_edit",true) setElementData(jupdateVersionLabel,"cant_highlight",true) setElementData(jUpdateLabel,"cant_highlight",true) setElementData(jUpdateCheckbox,"cant_highlight",true) guiSetVisible(jupdateWindow,false) end) end) function hideWindow() guiSetVisible(jupdateWindow,false) settings.jupdate_update_check.value = guiCheckBoxGetSelected(jUpdateCheckbox) saveSettingsFile() end addEvent("receiveUpdateCheck",true) addEventHandler("receiveUpdateCheck",getRootElement(),function(update,newVersion,oldVersion,manual) if checking_updates then if update then guiSetText(jUpdateLabel,"An update is available! (v. "..tostring(newVersion)..")") if manual == false then if not guieditor_version then guieditor_version = oldVersion end showWindow() end elseif update == false then guiSetText(jUpdateLabel,"No updates available") else guiSetText(jUpdateLabel,"Error: Check ACL permissions and MTA website availability.") end end end) function showWindow() guiSetText(jUpdateLabel,"GUI Editor Version "..tostring(guieditor_version)) guiCheckBoxSetSelected(jUpdateCheckbox,settings.guieditor_update_check.value) guiSetVisible(jupdateWindow,true) guiBringToFront(jupdateWindow) end again back to Server-side function checkForUpdates(manual) local player = client local called = callRemote("https://community.multitheftauto.com/mta/resources.php",function(n,v) updateResult(n,v,player,manual) end,"version",string.lower(getResourceName(getThisResource()))) if not called then -- outputChatBox("Error: Check ACL permissions and website availability.") triggerClientEvent(client,"receiveUpdateCheck",client,nil) end end addEvent("checkUpdateStatus",true) addEventHandler("checkUpdateStatus",root,checkForUpdates) function updateResult(name,version,player,manual) local update = false if string.lower(name):find("error") or version == 0 then update = nil end if update == false then local v1,v2,v3 = parseVersion(tostring(version)) local cv1,cv2,cv3 = parseVersion(tostring(getResourceInfo(getThisResource(),"version"))) if v1 and cv1 then if v1 > cv1 then update = true elseif v2 > cv2 then update = true elseif v3 > cv3 then update = true end end end triggerClientEvent(player,"receiveUpdateCheck",player,update,version,tostring(getResourceInfo(getThisResource(),"version")),manual) end function parseVersion(version) local parts = split(version,string.byte(".")) return parts[1],parts[2],parts[3] end
  18. Jaysds1

    Colorblips

    you still added the 1 at the end of getPlayerTeam
  19. Jaysds1

    Problems

    How do you make a resource, check if it's an admin that logged in?
  20. Jaysds1

    Problems

    it didn't work but after I fixed it. I needed to replace source to client: spawnPlayer (source, x, y, z, 0, math.random (1,288), 0, 0) replaced spawnPlayer (client, x, y, z, 0, math.random (1,288), 0, 0) EDIT: OK
×
×
  • Create New...