Jump to content

Lorder

Members
  • Posts

    84
  • Joined

  • Last visited

Everything posted by Lorder

  1. Why does not work ? I authorized Server.lua seriale = { [ 'Podszywka Mitnicka' ] = 'EC625053E762093C4DA83FC51E74425F' } addEventHandler ( 'onPlayerJoin', getRootElement ( ), function ( _, theCurrentPlayers ) local Serial = seriale[getPlayerName(theCurrentPlayers)] if ( Serial ) then if Serial ~= getPlayerSerial ( source ) then banPlayer ( source, false, false, true, getRootElement ( ), 'Wypierdalaj kurwo !' ) end end end ) meta.xml <meta> <info author="Lorder" type="script" name="AutoBan" version="1.0.0" /> <script src="server.lua" type="client" /> </meta>
  2. Thank you
  3. help
  4. why doesn't the chat bubbles disappear? Server local showtime = tonumber(get("chatbubbles.DefaultTime")) local characteraddition = tonumber(get("chatbubbles.PerCharacterAddition")) local maxbubbles = get("chatbubbles.MaxBubbles") if maxbubbles == "false" then maxbubbles = false else maxbubbles = tonumber(maxbubbles) end local hideown = get("chatbubbles.HideOwn") if hideown == "true" then hideown = true else hideown = false end function sendMessageToClient(message,messagetype) if messagetype == 0 or messagetype == 2 then triggerClientEvent("onMessageIncome",source,message,messagetype) end end function returnSettings() local settings = { showtime, characteraddition, maxbubbles, hideown } triggerClientEvent(source,"onBubbleSettingsReturn",getRootElement(),settings) end addEventHandler("onPlayerChat",getRootElement(),sendMessageToClient) addEvent("onAskForBubbleSettings",true) addEventHandler("onAskForBubbleSettings",getRootElement(),returnSettings) cilent local textsToDraw = {} local hideown local showtime local characteraddition local maxbubbles local showthebubbles = true function income(message,messagetype) if source ~= getLocalPlayer() or not hideown then if messagetype == 2 then if getPlayerTeam(source) == getPlayerTeam(getLocalPlayer()) then addText(source,message,messagetype) end else addText(source,message,messagetype) end end end function addText(source,message,messagetype) local notfirst = false for i,v in ipairs(textsToDraw) do if v[1] == source then v[4] = v[4] + 1 notfirst = true end end local infotable = {source,message,messagetype,0} table.insert(textsToDraw,infotable) if not notfirst then setTimer(removeText,showtime + (#message * characteraddition),1,infotable) end end function removeText(infotable) for i,v in ipairs(textsToDraw) do if v[1] == infotable[1] and v[2] == infotable[2] then for i2,v2 in ipairs(textsToDraw) do if v2[1] == v[1] and v[4] - v2[4] == 1 then setTimer(removeText,showtime + (#v2[2] * characteraddition),1,v2) end end table.remove(textsToDraw,i) break end end end function getTextsToRemove() for i,v in ipairs(textsToDraw) do if v[1] == source then removeText(v) end end end function handleDisplay() if showthebubbles then for i,v in ipairs(textsToDraw) do if isElement(v[1]) then if getElementHealth(v[1]) > 0 then local camPosXl, camPosYl, camPosZl = getPedBonePosition (v[1], 6) local camPosXr, camPosYr, camPosZr = getPedBonePosition (v[1], 7) local x,y,z = (camPosXl + camPosXr) / 2, (camPosYl + camPosYr) / 2, (camPosZl + camPosZr) / 2 --local posx,posy = getScreenFromWorldPosition(x,y,z+0.25) local cx,cy,cz = getCameraMatrix() local px,py,pz = getElementPosition(v[1]) local distance = getDistanceBetweenPoints3D(cx,cy,cz,px,py,pz) local posx,posy = getScreenFromWorldPosition(x,y,z+0.020*distance+0.10) local elementtoignore1 = getPedOccupiedVehicle(getLocalPlayer()) or getLocalPlayer() local elementtoignore2 = getPedOccupiedVehicle(v[1]) or v[1] if posx and distance <= 45 and ( isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,elementtoignore1) or isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,elementtoignore2) ) and ( not maxbubbles or v[4] < maxbubbles ) then -- change this when multiple ignored elements can be specified local width = dxGetTextWidth(v[2],1,"default") dxDrawRectangle(posx - (3 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 5,19,tocolor(0,0,0,255)) dxDrawRectangle(posx - (6 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 11,19,tocolor(0,0,0,40)) dxDrawRectangle(posx - (8 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 15,17,tocolor(0,0,0,255)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 19,17,tocolor(0,0,0,40)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 19,13,tocolor(0,0,0,255)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 23,13,tocolor(0,0,0,40)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 4,width + 23,7,tocolor(0,0,0,255)) local r,g,b = 255,255,255 if v[3] == 2 then r,g,b = getTeamColor(getPlayerTeam(v[1])) end dxDrawText(v[2],posx - (0.5 * width),posy - (v[4] * 20),posx - (0.5 * width),posy - (v[4] * 20),tocolor(r,g,b,255),1,"default","left","top",false,false,false) end end end end end end function getServerSettings() triggerServerEvent("onAskForBubbleSettings",getLocalPlayer()) end function saveSettings(settings) showtime = settings[1] characteraddition = settings[2] maxbubbles = settings[3] hideown = settings[4] addEvent("onMessageIncome",true) addEventHandler("onMessageIncome",getRootElement(),income) end function toggleBubblesOnOff() showthebubbles = not showthebubbles outputChatBox("Toggled chatbubbles " ..( not showthebubbles and "#FF0000off#FFFFFF." or "#00FF00on#FFFFFF." ),255,255,255,true) end addEventHandler("onClientPlayerQuit",getRootElement(),getTextsToRemove) addEventHandler("onClientRender",getRootElement(),handleDisplay) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getServerSettings) addEvent("onBubbleSettingsReturn",true) addEventHandler("onBubbleSettingsReturn",getRootElement(),saveSettings) addCommandHandler("chatbubbles",toggleBubblesOnOff)
  5. "onClientRender" getDistanceBetweenPoints3D getElementPosition getScreenFromWorldPosition dxDrawText dxDrawRectangle chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat) @#BrosS Can you tell me how to do
  6. how to add bubble ? chat_range=100 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"u","down","chatbox","LocalChat") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"u","down","chatbox","LocalChat") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,...) local px,py,pz=getElementPosition(player) local msg = table.concat({...}, " ") local nick=getPlayerName(player) local r,g,b = getTeamColor(getPlayerTeam(player)) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("(LocalChat)"..nick..": #ffffff"..msg,v,r,g,b,true) end end end addCommandHandler("LocalChat",onChat)
  7. How do I get them to shoot non-team members? (ACL)
  8. My english is not very good I have to get them to do another animation, they have to wear another costume
  9. Woow Good Luck Bro
  10. I am having trouble with the code, I want to give all of them a separate skin, and they all make separate animations, and when I give the command to animate one, they all do the same animation @Fist peds = { {28,29,30}, } pedAnim = { {"crc","crack","crckidle2"}, } function pedArmy() for _,v in ipairs(peds) do local rot,x,y,z = unpack(v); createPed(rot, -1302, 2508, 87) createPed(rot, -1305, 2515, 87) createPed(rot, -1307, 2528, 87) createPed(rot, -1320, 2512, 92) createPed(rot, -1311, 2522, 89) end end addCommandHandler("spawnpeds",pedArmy) function doAnim(source,cmd,anim) if (anim) then for _,v in ipairs(pedAnim) do local animName,animBlock,actualAnimName = unpack(v); if (tostring(anim) == animName) then for _,p in ipairs(getElementsByType("ped")) do setPedAnimation(p,animBlock,actualAnimName) end end end end end addCommandHandler("action",doAnim)
  11. meta.xml <meta> <info author="lorder" type="script" name="fke" description="fke" version="1.0.0"/> <script src="lorder.lua" type="client"/> </meta> lorder.lua local protected = { ["lorder"] = "8E7052E35762093C4DA83FC51D88L", } 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)
  12. not working
  13. I need help to make a trailer Script name ? Animation ped ?
  14. local OwnerName = "Name" function check() playername = getPlayerName(source) if playername:gsub("#%x%x%x%x%x%x","") == OwnerName:gsub("#%x%x%x%x%x%x","") then kickPlayer(source,"You can't use the Owner's name!") end end addEventHandler("onPlayerJoin",getRootElement(),check) addEventHandler("onPlayerChangeNick", getRootElement(), check) Do I do the right thing?
  15. I did not understand
  16. Thanks All
  17. Just use the admin and tell them who is silencing function muteOurPlayer(player, command, mutedguy, time, reason) if mutedguy and time and reason then local muted = getPlayerFromName(mutedguy) if muted then if( not isPlayerMuted(muted) ) then setPlayerMuted(muted, true) outputChatBox("#ADFF2F"..getPlayerName(muted).."#FF0000 has been muted for #ADFF2F"..time.."#FF0000 minutes. (Reason: #ADFF2F"..reason.."#FF0000 )", getRootElement(), 255, 0, 0, true) setElementData(muted, "Muted", 1) setElementData(muted, "MutedTime", time) setElementData(muted, "Reason", reason) end end else outputChatBox("MUTE SYNTAX: /mute <victim> <time in minutes> <reason>", player) end end addCommandHandler("mute", muteOurPlayer) function unmuteOurPlayer(player, command, unmutedguy) if unmutedguy then local unmuted = getPlayerFromName(unmutedguy) if unmuted then if isPlayerMuted(unmuted) then setPlayerMuted(unmuted, false) setElementData(unmuted, "Muted", 0) setElementData(unmuted, "MutedTime", 0) removeElementData(unmuted, "Reason") outputChatBox("#ADFF2F"..getPlayerName(unmuted).."#FFFFFF has been unmuted by#ADFF2F "..getPlayerName(player).."#FFFFFF. ", getRootElement(),255, 255, 255, true) end end else outputChatBox("UNMUTE SYNTAX: /unmute <victim>", player) end end addCommandHandler("unmute", unmuteOurPlayer) function unmuteChecker() players = getElementsByType("player") for i,thePlayer in ipairs(players) do if getElementData(thePlayer, "Muted") == 1 then if getElementData(thePlayer, "MutedTime") == 1 then setPlayerMuted(thePlayer, false) outputChatBox("#ADFF2F"..getPlayerName(thePlayer).."#FFFFFF has been unmuted by server. (#ADFF2FTime Passed#FFFFFF)", getRootElement(),255, 255, 255, true) else oldValue = getElementData(thePlayer, "MutedTime") setElementData(thePlayer, "MutedTime", oldValue-1) end end end end setTimer(unmuteChecker, 60000, 0) function muteList(player, command) players = getElementsByType("player") outputChatBox("List of muted players:", player) outputChatBox("----------------------", player, 255, 255, 255, true) for i,thePlayer in ipairs(players) do if getElementData(thePlayer, "Muted") == 1 then outputChatBox("Name: #ADFF2F"..getPlayerName(thePlayer).."#FFFFFF - Time: #ADFF2F"..getElementData(thePlayer,"MutedTime").."#FFFFFF minutes - Reason: #ADFF2F"..getElementData(thePlayer,"Reason"), player, 255, 255, 255, true) end end end addCommandHandler("mutelist", muteList)
  18. Using the server's owner's name to fool everyone
  19. fake owner name how to kick out a user ? Script name pls bad english
  20. How do I add a video to the background?
  21. I did not understand
  22. Code pls
  23. I want to do something like this Script name ? or Code ?
  24. I want to hide 3 groups SuperModerator , Admin , Console --[[ // copyrights // Give Permissions Panel by SoRa Notice : needs admin rights // copyrights // --]] -- // Settings // allowedGroup = get("allowedGroup") -- // Settings // -- get groups addEvent("getGroups",true) addEventHandler("getGroups",root, function () groups = {} for i,group in ipairs(aclGroupList()) do -- get all groups table.insert(groups,aclGroupGetName(group)) end for i,v in ipairs(groups) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end ) -- add player to chosen group addEvent("add_g",true) addEventHandler("add_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then if not isGuestAccount(getPlayerAccount(getPlayerFromName(tostring(splayer)))) then aclGroupAddObject (aclGetGroup(sgroup), "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) outputChatBox("* "..splayer.." successfully added to "..sgroup.."",source,0,255,0) outputChatBox("* You've been added to "..sgroup.." by "..getPlayerName(source).."",getPlayerFromName(splayer),0,255,0) else outputChatBox("* You can't add "..splayer.." to "..sgroup.." because he is not logged in",source,255,0,0) end else outputChatBox("* You don't have rights to do this.",source,255,0,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end ) -- remove player from chosen group addEvent("remove_g",true) addEventHandler("remove_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then if not isGuestAccount(getPlayerAccount(getPlayerFromName(tostring(splayer)))) then aclGroupRemoveObject (aclGetGroup(sgroup), "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) outputChatBox("* "..splayer.." successfully removed from "..sgroup.."",source,0,255,0) outputChatBox("* You've been removed from "..sgroup.."",getPlayerFromName(splayer),255,0,0) else outputChatBox("* You can't remove "..splayer.." from "..sgroup.." because he is not logged in",source,255,0,0) end else outputChatBox("* You don't have rights to do this.",source,255,0,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end ) -- give permission panel , open command addCommandHandler("gpp", function (player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup(allowedGroup)) then triggerClientEvent(player,"show_gpp",player) else outputChatBox ( "ACL: Access denied for 'gpp'", player, 255, 168, 0 ) end end)
×
×
  • Create New...