Jump to content

Mischief-1

Members
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    1

Mischief-1 last won the day on April 17

Mischief-1 had the most liked content!

Details

  • Gang
    Scripter
  • Location
    Philippines
  • Interests
    OOP

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mischief-1's Achievements

Rat

Rat (9/54)

3

Reputation

  1. I was able to fix this error, I kinda had to rewrite it.
  2. I managed to solve this error, I'm not sure if I'm doing it correctly. addCommandHandler("globalchat", function(player, _, ...) if (configVar.globalchat) then local string globalAccount = table.concat({...}) if exports.adblock:isAdvertisement(globalAccount) then outputChatBox("#880808[Warning!] #D3D3D3Advertising is not allowed, further doing so can result in getting banned!.", source, 211, 211, 211,true) return; end if isPlayerMuted(player) then outputChatBox(getLanguageTextServer("clientinfotext43",player), player, 136,8,8); return; end if (getElementData(player,"antichat")) then outputChatBox(getLanguageTextServer("clientinfotext41",player), player, 136,8,8); return; else setElementData(player,"antichat",true) setTimer(setElementData, 1000, 1, player, "antichat", false); end for _,v in ipairs(getElementsByType("player")) do outputChatBox("#880808[Global] #D3D3D3"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#D3D3D3: "..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); end end end);
  3. Hi my apologies for bumping this old threat, however I am having problem using the export. addCommandHandler("globalchat", function(player, _, ...) if (configVar.globalchat) then if exports.adblock:isAdvertisement(message) then outputChatBox("#880808[Warning!] #D3D3D3Advertising is not allowed, further doing so can result in getting banned!.", source, 211, 211, 211,true) return; end if isPlayerMuted(player) then outputChatBox(getLanguageTextServer("clientinfotext43",player), player, 136,8,8); return; end if (getElementData(player,"antichat")) then outputChatBox(getLanguageTextServer("clientinfotext41",player), player, 136,8,8); return; else setElementData(player,"antichat",true) setTimer(setElementData, 1000, 1, player, "antichat", false); end for _,v in ipairs(getElementsByType("player")) do outputChatBox("#880808[Global] #D3D3D3"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#D3D3D3: "..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); end end end);
  4. No problem, grad to help you can request to close this thread to admins if nothing else is needed
  5. Desculpe, não entendi, você pode me dar um exemplo.
  6. Please disregard the post above.. This is a working code ----server addCommandHandler("adminchat", function(player, _, ...) local account = getAccountName(getPlayerAccount(player)) --get the player account for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user." .. account, aclGetGroup("Staff")) then --- this section you can customize which ACL role they are. outputChatBox("#7D6608[Admin]#9A7D0A"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#7D6608: #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); --- thisplay chat you can customize as well. else outputChatBox("You don't have enough access to use this chat!") end end end ) ---client bindKey("h", "down", "chatbox", "adminchat"); Please hit like on 2 of my posts if these helped you
  7. It should be possible, just a concept, not sure it works with this code, but you can modify the rest. --- server addCommandHandler("adminchat", function(player, _, ...) for _,v in ipairs(getElementsByType("player")) do if isObjectInACLGroup("user."..account,aclGetGroup("Staff")) then --- uses ACL to determine who is able use. if (getElementData(v, "adminchat") == getElementData(player, "adminchat")) then outputChatBox("#7D6608[Admin]#9A7D0A"..getPlayerName(player):gsub("#%x%x%x%x%x%x", "").."#7D6608: #FFFFFF"..table.concat({...}, " "):gsub("#%x%x%x%x%x%x", ""), v, 255, 255, 255, true); end end end end); --- client bindKey("u", "down", "chatbox", "adminchat");
  8. Seemed like I added extra lines that were not useful.. Here is the revised code.
  9. Hi everyone, I would like to share this revived script for removing hex in players' nickname. PS: I do not own this, credits go to where credit is due. I modified it and added conditions to make sure that no hex will go thru. as currently the script available in community does not work for people who uses two hexes in their name example /nick #FFA500#FFA500Test as it will only remove one. Current problem I'm trying to solve is that when changing nickname, it displays twice because the user changes the nickname twice so want to remove that one. See pic as reference. Thanks! Feel free to comment as well to help improve the code https://imgur.com/a/6MwJmst
  10. I hate to bump this old script, but I've been trying to modify it to my liking, I would love to share it as well to the community if anyone needs it, but I need a little help. I've been having errors when giving items to someone. If you can still respond to this, can you help me? https://imgur.com/a/6WZ3KjU server function giveEvent(selectedPlayer,item,quantity) setElementData(selectedPlayer,item,getElementData(selectedPlayer,item)+quantity) outputChatBox(prefix.." Admin "..string.gsub(getPlayerName(source), "#%x%x%x%x%x%x", "").." gave you "..quantity.." "..item,selectedPlayer,0,0,0,true) outputChatBox(prefix.." You gave "..quantity.." "..item.." to "..string.gsub(getPlayerName(selectedPlayer), "#%x%x%x%x%x%x", ""),source,0,0,0,true) end addEvent("giveEvent",true) addEventHandler("giveEvent",root,giveEvent) client function give() if (guiGridListGetSelectedItem(giveWindowGridlist) ~= -1) then local item = guiGridListGetItemText(giveWindowGridlist,guiGridListGetSelectedItem(giveWindowGridlist)) local quantity = guiGetText(giveWindowEditboxQuant) local selectedPlayer = getPlayerFromName(guiGridListGetItemText(gridlistPlayers1,item,1)) if selectedPlayer then triggerServerEvent("giveEvent",localPlayer,selectedPlayer,item,quantity) end end end
  11. Como faço para que ao usar visão noturna ou infravermelho, a distância e a luz voltem ao normal e se estiver desligada, volte a seguir este código? Tentei fazer a condição, mas quando desligo o infravermelho ou a visão noturna a distância só volta ao normal depois de 1 minuto.
  12. Please close this thread thanks!
  13. I see, thanks how do I make the gui that when i press the key again it closes? addEvent("playerOnClick", true) addEventHandler("playerOnClick", root, function() guiGridListClear ( w.gridList.main ) for i,veh in ipairs(getElementsByType("vehicle")) do if veh ~= vehicle then local row = guiGridListAddRow ( w.gridList.main ) local x,y,z = getElementPosition(veh) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column1, getVehicleName ( veh ), false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column2, x, false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column3, y, false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column4, z, false, false ) end end guiSetVisible(w.main, true) showCursor(true) end ) function hasPermission(key,keyState) if getElementData(localPlayer, "logedin") then triggerServerEvent("hasPermissionEvent",localPlayer,key,keyState) end end bindKey("p", "down", hasPermission) Edit : you can disregard these, I made if else statement and created to false. function playerOnClick(key,keyState) if (keyState == "down") then if (guiGetVisible(w.main) == false) then guiGridListClear ( w.gridList.main ) for i,veh in ipairs(getElementsByType("vehicle")) do if veh ~= vehicle then local row = guiGridListAddRow ( w.gridList.main ) local x,y,z = getElementPosition(veh) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column1, getVehicleName ( veh ), false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column2, x, false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column3, y, false, false ) guiGridListSetItemText ( w.gridList.main, row, w.gridList.column4, z, false, false ) end end guiSetVisible(w.main, true) showCursor(true) else guiSetVisible(w.main, false) showCursor(false) end end end addEvent("playerOnClick",true) addEventHandler("playerOnClick",root,playerOnClick) but of course, If you can recommend a better way than what I did please feel free to share your opinion I would very much appreciate it.
  14. Hello everyone! How do I disable horizontal gridlist scroll? I want to have it only scrolling vetically. GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() local screenW, screenH = guiGetScreenSize() GUIEditor.window[1] = guiCreateWindow((screenW - 544) / 2, (screenH - 401) / 2, 544, 401, "Vehicle & Tend Finder", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.77) GUIEditor.button[1] = guiCreateButton(176, 350, 77, 37, "Locate", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(263, 350, 77, 37, "Close", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(538, 274, 524, 309, false) guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "X", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Y", 0.2) guiGridListAddColumn(GUIEditor.gridlist[1], "Z", 0.2)
×
×
  • Create New...