Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Om.

  1. Instead or outputChatBox and JSON, You can use iprint function to print the table
  2. OR, You can use something like table to protect many nicks e.g local protected = { ["Nickname1"] = "Player 1 Serial", ["Nickname2"] = "Player 2 Serial" } function checkForNickname() local name = getPlayerName(source) if protected[name] then local serial = getPlayerSerial(source) if serial ~= protected[name] then kickPlayer(source, "Nickname is protected!") end end end addEventHandler("onPlayerJoin", root, checkForNickname) addEventHandler("onPlayerChangeNick", root, checkforNickname) Still didn't test it tho, should work
  3. not so exp, but tried using cancelEvent() before calling chatMain function?
  4. If you mean this: Then it's probably your pc. For me, this error occurs whenever I don't have my audio device (Headphones/Speakers) plugged in. If it's plugged in then i get no error(s). Incase you've already plugged your headsets and it still says the same, You gotta install Realtek Audio Drivers
  5. Om.

    Login Panel

    You can use mine, although it's a bit hard to install, i've mentioned the installation steps on the topic. Resource: https://community.multitheftauto.com/index.php?p=resources&s=details&id=13930 Topic:
  6. Well, This one worked too :3 thank you
  7. Om.

    mysql error

    in dbQuery, you have to put 2 argument, first the connection handler, second is mysql query. Example: conn = dbConnect("blabla") query = dbQuery(conn, "Your MySQL Query.")
  8. function mutePlayer(button) if button == "left" then if (source == playerTab.button[2]) then player = guiGridListGetSelectedItemText(GUIEditor.gridlist[1]) time = guiGetText(playerTab.combobox[1]) reason = guiGetText(playerTab.edit[1]) thePlayer = getPlayerFromName(player) if (time == "10 mins") then setElementData(thePlayer, "isPlayerMuted", true) setTimer(setElementData, 1000, 1, getPlayerFromName(player), false) outputChatBox("(Admin) " .. player .. " has been muted for 10 minutes by " .. getPlayerName(localPlayer) .. " for " .. reason) end guiSetVisible(playerTab.window[1], false) guiSetVisible(GUIEditor.window[1], true) end end end addEventHandler("onClientGUIClick", resourceRoot, mutePlayer) Debug Error says: Bad argument @ 'setElementData' [Expected string at argument 2, got boolean on this line: setTimer(setElementData, 1000, 1, getPlayerFromName(player), false)
  9. Thank you. I just released it. you can check if you want.
  10. https://community.mtasa.com/index.php?p=resources&s=details&id=13929 DELETE PLS
  11. no, fighting with my own self.
  12. Login System Some Images of GUI: https://puu.sh/sJnRg/2928be4ec3.png https://puu.sh/sJnTw/cb57d4b9ce.png Features: Uses External MySQL Database for register/login Logs in user to MTA System if account exist. It is opensource Installation: Configure your database configurations in server.lua Export database.sql to your selected database. Add this resource to your ACL's admin group and boom! Finished! You can start the script and connect to the server! Download Links MTA Community Resource: https://community.mtasa.com/index.php?p=resources&s=details&id=13930 Exports: -- To Be Updated.. exports.login:getPlayerUsername(player) -- Gets Player Username.
  13. @MR.S3D You didn't get me, Opening the GUI works perfectly fine, but when there are many people on logging screen, if one guy clicks "Login" button, The Login GUI Disappears for everyone who were on login gui ps: it got solved automatically, lol
  14. Full Codes: http://pastebin.com/ck4e1P6j http://pastebin.com/X3am4jHR @MR.S3D
  15. after clicking "login button" everything works fine, but GUI closes to all players who are in login screen instead of only the localplayer, pls help function successfullLogin() fadeCamera(true, 1, 255, 0, 0) guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addEvent("login.success", true) addEventHandler("login.success", root, successfullLogin)
  16. DEBUG ERROR: bad argument @ 'attachElements' [Expected element at argument 1, got boolean] I've no idea why. local helicopter = { ["Police Maverick"] = true, ["Sparrow"] = true, ["Cargobob"] = true, ["Hunter"] = true, } function SwatRope() local myVehicle = getPedOccupiedVehicle(localPlayer) if myVehicle and helicopter[getVehicleName(myVehicle)] then local x,y,z = getElementPosition(myVehicle) local loc = createSWATRope(x, y, z, 10000) attachElements(loc, localPlayer, 0, 0, 5) end end addCommandHandler("rope", SwatRope)
  17. @Foxlu Are you sure you installed correct version of the mysql socket? maybe your server is 64bit and you installed 32bit module, or vice versa.
  18. It works, but it does not change, it remains stable. since last is SF Airport, Title comes of SF for all GUIs. anyways this is solved, thank you You probably tested only in easten bay airport.
  19. gotta try it' thanks
  20. --[[ -- Resource Name: Information. -- Author: Om (RipeMangoes69) -- Date: 4/12/2016 -- File: client.lua ]]-- -- GUI GUIEditor = { window = {}, label = {}, memo = {} } function createInfoObjects() local markers = { {area = "Los Santos Airport", x = 1582.45, y = -2286.32, z = 12}, {area = "Las Vegas Airport", x = 1674.30859375, y = 1444.9501953125, z = 9.2} } for _, m in ipairs(markers) do local marker = createMarker(m.x, m.y, m.z, "cylinder", 1, 255, 255, 255, 100) GUIEditor.window[1] = guiCreateWindow(645, 250, 266, 378, "Information: " .. m.area, false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(5, 353, 190, 15, "* Click anywhere on GUI Window to close it.", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "default-small") GUIEditor.memo[1] = guiCreateMemo(9, 24, 247, 324, "", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) end end addEventHandler("onClientResourceStart", getRootElement(), createInfoObjects) function openGUI( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" then if isPedInVehicle(hitElement) then outputChatBox("You cannot access GUI from vehicle!", 255, 0, 0) guiSetVisible(GUIEditor.window[1], false) showCursor(false) else guiSetVisible(GUIEditor.window[1], true) showCursor(true) end end end addEventHandler("onClientMarkerHit", resourceRoot, openGUI) function closeGUI() guiSetVisible(GUIEditor.window[1], false) showCursor(false) end addEventHandler("onClientGUIClick", resourceRoot, closeGUI) How am i suppose to "change" the GUI Title ? (area in the table). thanks.
  21. I'm free developer right here. but too busy fighting with life
  • Create New...