TorNix~|nR

Members
  • Content Count

    474
  • Joined

  • Last visited

Everything posted by TorNix~|nR

  1. TorNix~|nR

    elementType

    Hello guys, I wanted to ask where is the problem in this? I'm getting debug expected argument... how can I fix it? local veh = (getElementType(source) == "vehicle") if veh and isVehicleDamageProof(veh) == false then help please!
  2. TorNix~|nR

    elementType

    Thank you so much!
  3. TorNix~|nR

    getElementsByType

    hello guys, please I'm wondering why isn't this working for index,thisPlayer in pairs(getElementsByType("player") or getElementsByType("ped")) do nothing found on debug, but only ped works but player not help please?
  4. TorNix~|nR

    getElementsByType

    Thank you!
  5. TorNix~|nR

    Map

    Hello guys, please is there anyway to remove these texts from the map (F11) ?
  6. TorNix~|nR

    Map

    I know, I want to remove it completely, how?
  7. TorNix~|nR

    killmessages position

    hello guys, I'm wondering how to change the killmessages position from right to left I changed all aligns on gui.lua, but it didn't work any help please?
  8. TorNix~|nR

    killmessages position

    Problem solved!
  9. TorNix~|nR

    Jetpack Weapon

    Hello guys, please I need help I want to allow using the Combat Shotgun ID: 27 to jetpack like other weapons like Pistol, UZI.. etc help please
  10. TorNix~|nR

    Jetpack Weapon

    Thanks
  11. TorNix~|nR

    Engine Switch

    Hello guys, I have a little problem, I don't know from where it come, the engine switch on the vehicle system was working so fine! but suddenly it won't work anymore I don't know why, I tried so many different codes, but it's the same function engineSwitch () if (isPedInVehicle (source)) then local veh = getPedOccupiedVehicle (source) if (getVehicleEngineState (veh) == true) then setVehicleEngineState (veh, false) outputChatBox ("Successfully closed vehicle.", source, r, g, b, true) elseif (getVehicleEngineState (veh) == false) then setVehicleEngineState (veh, true) outputChatBox ("Successfully open vehicle.", source, r, g, b, true) else outputChatBox ("This is not your vehicle.", source, r, g, b, true) end end end addEvent("engenieSwitch",true) addEventHandler("engenieSwitch",getRootElement(),engineSwitch) any help please?
  12. TorNix~|nR

    Engine Switch

    I'm sorry I didn't see the reply, even the problem is still on xd :( I tested this code on local and it's working, but when I test it on my server it won't work, only the engine, help please addEvent("engenieSwitch", true) addEventHandler("engenieSwitch", root, function(id) local vehicle = getVehicleByID(id) if isElement(vehicle) then if (getVehicleEngineState (vehicle) == true) then setVehicleEngineState (vehicle, false) setVehicleOverrideLights(vehicle, 1) elseif (getVehicleEngineState (vehicle) == false) then setVehicleEngineState (vehicle, true) setVehicleOverrideLights(vehicle, 2) else end end end)
  13. TorNix~|nR

    Object Preview

    I used this resource ( object_preview ), the ped is showed but when I save it on png, it saves but saves empty this is the resource on community https://community.multitheftauto.com/index.php?p=resources&s=details&id=11836 any help please? this is the code local x, y, z = getCameraMatrix() local sx, sy = guiGetSize(GUIEditor.staticimage[1], false) local skin = createPed(getElementModel(localPlayer), x, y, z) local view = exports.object_preview:createObjectPreview(skin, 0, 0, 200, 0, 0, sx, sy, false, false, true) exports.object_preview:saveRTToFile(view, "gui_skin.png") exports.object_preview:destroyObjectPreview(view) destroyElement(skin) guiStaticImageLoadImage(GUIEditor.staticimage[1], "gui_skin.png")
  14. TorNix~|nR

    Object Preview

    @Ren_712
  15. TorNix~|nR

    Object Preview

    Thank you it's working, but when I open the panel, every 50 milliseconds the ped automatically disappear, this is the problem you can see the image, it appears and suddenly disappears every time I open the panel Code: local x, y, z = getCameraMatrix() local sx, sy = guiGetSize(GUIEditor.staticimage[1], false) local skin = createPed(getElementModel(localPlayer), x, y, z) local view = exports.object_preview:createObjectPreview(skin, 0, 0, 200, 0, 0, sx, sy, false, false, true) setTimer(function ( ) exports.object_preview:saveRTToFile(view, "gui_skin.png") guiStaticImageLoadImage(GUIEditor.staticimage[1], "gui_skin.png") exports.object_preview:destroyObjectPreview(view) destroyElement(skin) end, 50, 1) Image:
  16. TorNix~|nR

    Object Preview

    is it that hard? any help please?
  17. TorNix~|nR

    Scoreboard

    Hello guys, I have weird problem on the scoreboard, the names and teams.. etc doesn't show normally I don't know why? is there any way to fix it
  18. TorNix~|nR

    Scoreboard

    @MandaBraza, thank you so much, it's working ^^
  19. TorNix~|nR

    Scoreboard

    anyone help me please?
  20. TorNix~|nR

    Scoreboard

    it's already like that, any other help please?
  21. TorNix~|nR

    Scoreboard

    yes, dxscoreboard but I edit it a little bit
  22. TorNix~|nR

    (AC #4 DHOS)

    Hello guys, I started MTA now, when I enter to any server, I get kicked by this reason, .. was kicked from the game by (AC #4 DHOS) any solution please?, some days ago, it was working without problem Problem solved guys! I restarted the pc and it's fine PS: I never used a hack on mta :3 even I don't know how (I have a server and I do know that meaning xd)
  23. TorNix~|nR

    Mutep

    Guys, please I need help, I just want to show the ..reason.. on the logs, it shows only ..reason.. not the real reason it's not a problem on the script, I added the logs
  24. TorNix~|nR

    Mutep

    hello guys, I'm using the mute panel script of @Dutchman101, it's good I like it, thanks to him but I get a little problem, I didn't know how to solve it, I made a logs to see the players who get muted, is worked, but I can't add the ( reason ) into the logs, I don't know why Client-Side local sx, sy = guiGetScreenSize() addEvent ("requestMutePanel", true) function openMutePanel() if isElement(mp) then return end showCursor(true) guiSetInputMode("no_binds") mp = guiCreateWindow(sx/2-139, sy/2-265, 278, 530, "Mute Panel", false) guiWindowSetSizable(mp, false) guiSetAlpha(mp, 0.90) mp_grid = guiCreateGridList(9, 79, 259, 271, false, mp) local playersCol = guiGridListAddColumn(mp_grid, "Players:", 0.9) --Fill gridlist with online players: if playersCol then for _,p in ipairs(getElementsByType("player")) do if p ~= localPlayer then local row = guiGridListAddRow (mp_grid) guiGridListSetItemText (mp_grid, row, playersCol, getPlayerName(p), false, false) guiGridListSetItemData (mp_grid, row, 1, p) end end end mp_search = guiCreateEdit(9, 47, 259, 27, "", false, mp) mp_searchlbl = guiCreateLabel(91, 29, 97, 18, "Search by name:", false, mp) guiSetFont(mp_searchlbl, "default-bold-small") mp_reasonlbl = guiCreateLabel(29, 355, 234, 15, "Reason (Please do not abuse your mp):", false, mp) ---------------------------------------------- guiSetFont(mp_reasonlbl, "default-bold-small") guiLabelSetColor(mp_reasonlbl, 254, 0, 0) mp_reasonmemo = guiCreateMemo(9, 375, 258, 67, "", false, mp) mute = guiCreateButton(11, 449, 257, 32, "Mute", false, mp) guiSetProperty(mute, "NormalTextColour", "FFFD9500") closemp = guiCreateButton(11, 488, 257, 32, "Close Window", false, mp) end addEventHandler ("requestMutePanel", localPlayer, openMutePanel) function onMPGUIClick(btn, state) if btn == "left" and state == "up" then if source == closemp then guiSetInputMode("allow_binds") if isElement(mp) then destroyElement(mp) end showCursor(false) elseif source == mute then local reason = guiGetText(mp_reasonmemo) ----------------------------------------- if not reason or reason == "" or reason:len() < 3 then outputChatBox ("* Mute Panel: Reason needs to be at least 4 characters long", 255, 30, 30) --------------------------------- else local r, c = guiGridListGetSelectedItem (mp_grid) if not r or r == -1 or not c or c == -1 then return outputChatBox ("* Mute Panel: Select a player from the list", 255, 30, 30) end local playerData = guiGridListGetItemData (mp_grid, r, c) if not playerData or not isElement(playerData) then return outputChatBox ("* Mute Panel: This player no longer exists", 255, 30, 30) end triggerServerEvent ("onMutePanelMute", localPlayer, playerData, reason) end end end end addEventHandler ("onClientGUIClick", root, onMPGUIClick) function searchBarFunction() if source == mp_search then local searchText = guiGetText(mp_search) if searchText == "" then guiGridListClear(mp_grid) for _,p in ipairs(getElementsByType("player")) do if p ~= localPlayer then local row = guiGridListAddRow (mp_grid) guiGridListSetItemText (mp_grid, row, 1, getPlayerName(p), false, false) guiGridListSetItemData (mp_grid, row, 1, p) end end else guiGridListClear(mp_grid) for _,plr in ipairs(getElementsByType("player")) do local name = getPlayerName(plr) -- remove hex first: for i=1,3 do if name:find("#%x%x%x%x%x%x") then name = name:gsub("#%x%x%x%x%x%x", "") else break end end if getPlayerName(plr):lower():find(searchText:lower()) or name:lower():find(searchText:lower()) then local row = guiGridListAddRow(mp_grid) guiGridListSetItemText(mp_grid, row, 1, getPlayerName(plr), false, false) guiGridListSetItemData (mp_grid, row, 1, plr) end end end end end addEventHandler ("onClientGUIChanged", root, searchBarFunction) Server-Side -- Always change this to player account names you want to be a MuteMod local authorizedMuters = { [".............."] = true, [".............."] = true } local aclGroupName = "mutepanel" -- ## End of Settings ## -- # Main Code # Edit with caution # function scriptInitialize() -- Check/create ACL group local aclGroup = aclGetGroup (aclGroupName) if not aclGroup or aclGroup == nil then if not aclGroupName or type(aclGroupName) ~= "string" then return outputDebugString ("Error creating ACL group for mute panel, check configuration", 0) end local aclg = aclCreateGroup (aclGroupName) local acl = aclCreate (aclGroupName) aclGroup = aclg if acl then aclSetRight (acl, "command.mute", true) aclGroupAddACL (aclg, acl) else return outputDebugString ("Error creating ACL group for mute panel, check configuration", 0) end end -- Clean group of old usernames local list = aclGroupListObjects(aclGroup) if list and #list ~= 0 then for _,object in ipairs (list) do local prefix = gettok(object, 1, ".") if prefix == "user" then local user = gettok(object, 2, ".") if user and not authorizedMuters[user] then if aclGroupRemoveObject (aclGroup, object) then outputDebugString ("* Mute Panel: User account '"..user.."' has been removed from the ACL as it has been removed from the script", 0) end end end end end if authorizedMuters then for k in pairs (authorizedMuters) do if getAccount(k) then if not isObjectInACLGroup ("user."..k, aclGroup) then if aclGroupAddObject (aclGroup, "user."..k) then outputDebugString ("* Mute Panel: Added user account '"..k.."' to ACL", 0) end end else outputDebugString ("* Mute Panel: Failed to add user account '"..k.."' as it is not registered", 0) end end end end addEventHandler ("onResourceStart", resourceRoot, scriptInitialize) function mutePanel(player) local account = getPlayerAccount(player) if account and not isGuestAccount(account) and authorizedMuters[getAccountName(account)] then setElementData (player, "AnonAdmin", true) triggerClientEvent (player, "requestMutePanel", player) end end addCommandHandler ("mp", mutePanel) --------------------------------------------- function time() local time = getRealTime(); return "["..(time.monthday).."-"..(time.month+1).."-"..(time.year+1900).."|"..time.hour..":"..time.minute.."]"; end function log(text) local f = fileOpen("logs.txt"); if not f then f = fileCreate("logs.txt"); end fileSetPos(f, fileGetSize(f)); fileWrite(f, time().." "..text:gsub("#%x%x%x%x%x%x", "").."\r\r"); fileFlush(f); fileClose(f); end --------------------------------------------- addEvent ("onMutePanelMute", true) function requestMute(victim, reason) if not client or source ~= client then return end if not victim or not isElement(victim) then return outputChatBox ("* Mute Panel: Selected player no longer exists", client, 255, 30, 30) end if isPlayerMuted(victim) then return outputChatBox ("* Mute Panel: Selected player is already muted", client, 255, 30, 30) end triggerEvent ("aPlayer", client, victim, "mute", reason, 300) log("'"..getPlayerName(source).."' muted '"..getPlayerName(victim).."' ("..reason..")"); ----------------------------------------- end addEventHandler ("onMutePanelMute", root, requestMute) the log is in line 103 server-side can I get any help please, I'm sorry for posting all the script, it's already open in the community resources
  25. TorNix~|nR

    Mutep

    Okay, thanks @Dutchman101