TorNix~|nR

Members
  • Content count

    453
  • Joined

  • Last visited

Community Reputation

17 Decent

About TorNix~|nR

  • Rank
    Hustler
  • Birthday 03/09/1998

Details

  • Gang
    LOS SANTOS
  • Location
    Tunisia
  • Occupation
    LOS SANTOS Zombie Owner

Recent Profile Visitors

3,229 profile views
  1. 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
  2. Mutep

    Okay, thanks @Dutchman101
  3. 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?
  4. Mutep

    is there anyhelp please?
  5. Mutep

    it says [time] the player who give the gag => to the player who is gagged then [ reason ] the reason isn't showing, that's the problem, it shows ..reason.. on the logs, I want it to show the reason that the player say that's the problem
  6. 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
  7. Antiveh

    Thank you so much jaazak allah <3
  8. Antiveh

    Hello guys I have a problem in this script, it said line: 9 Expected function at argument 3, got nil, any help please? local colPositions = { {96.24, 1808.96, 230, 150}, } local createdCols = {} for i, k in pairs(colPositions) do local tCol = createColRectangle(k[1], k[2], k[3], k[4]) -- Creating the col at the position with the fix width and height. addEventHandler("onColShapeHit", tCol, destroyTheVehicles) -- Adding the "onColShapeHit" event to the created col. table.insert(createdCols, tCol) -- Adding the created col to the "createdCols" table. end function cancelEnter(thePlayer) for i, k in pairs(createdCols) do -- Looping through the created cols. if isElementWithinColShape(thePlayer, k) then -- Checking if the player is inside one. destroyElement(source) -- If he is. outputChatBox("Vehicles are not allowed here!", thePlayer, 255, 0, 0) break end end end addEventHandler("onVehicleStartEnter", root, cancelEnter) function destroyTheVehicles(player) if getElementType(player) == "player" and isPedInVehicle(player) then local vehicle = getPedOccupiedVehicle(player) removePedFromVehicle(player) respawnVehicle(vehicle) outputChatBox("Vehicles are not allowed here!", player, 255, 0, 0) end end
  9. Shader

    Guys how can I make fire shader? I have the fx and a png of the fire, I want to make it shader, but I don't know how help please
  10. Глобальный бан

    @Senator3532, Он сказал вам отправить ему личное сообщение
  11. getVehicleOccupants

    It's working, thank you so much ^ _ ^
  12. getVehicleOccupants

    Hey guys, please I want help, why this doesn't work local vehicle = getPedOccupiedVehicle(player) local occupants = getVehicleOccupants(vehicle) removePedFromVehicle ( occupants )
  13. Question

    Thank you so much @Abdul KariM, jaazak allah ^^
  14. Question

    Hey guys, I used this on my script removePedFromVehicle it only removes the player who is driving, I want to remove all players inside the vehicle, any help please?