Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. If you want have blips color and are with team you can do that createBlipAttachedTo getElementsByType getPlayerTeam getTeamColor or getPlayerNametagColor
  2. getElementsByType getElementPosition getDistanceBetweenPoints3D outputChatBox
  3. function sayglobal (player,_,... ) local msg = table.concat({...}, " ") if getElementData(player,"LoggedIn") == true then for i, d in pairs(getElementsByType("player")) do if getElementData(d,"LoggedIn") == true then outputChatBox("#F0E68C[Global]".."#FFFFFF"..getPlayerName(player)..": "..msg, d,255,255,255,true) dbSetStat(getPlayerName(source),"ChatSays",dbGetStat(getPlayerName(source),"ChatSays")+1) end end end end addCommandHandler("g",sayglobal) addCommandHandler("Global",sayglobal)
  4. No dgsSetProperty(button, "color", {color, color2, color3})
  5. No it need [] and 3 color inside
  6. 1)Make sure that the resource has the database is running 2)Make sure you have in meta file write the export function correct and type server 3) Use /debugscipt 3 see errors or warnings that script have
  7. We are not here to script that for you we are here to help you with your code if you want a scripter then you are in wrong section
  8. Well it simple to make it all you need is this addCommandHandler setPlayerMuted kickPlayer banPlayer setTimer setElementPosition GetPlayerFormPartName
  9. You can't use engine load at least that i know for sure
  10. You need to replace them aswell
  11. For change cj head you need dxCreateTexture dxCreateShader dxSetShaderValue engineApplyShaderToWorldTexture
  12. emotes = {} function showEmotes(originaltext,emote,emoteID) local totaltextwidth = getImageOffsets(originaltext) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local originalmultiplier = math.floor(totaltextwidth/chatwidth) local text,_ = string.gsub(originaltext,tostring(emoteID..".*"),"") local width = getImageOffsets(text) local multiplier = math.floor(width/chatwidth) local width = width-multiplier*chatwidth table.insert(emotes,{emote,width,lines-(originalmultiplier-multiplier),false}) local _,index1 = string.gsub(originaltext,emoteID,emoteID) if index1>1 then local text,index = string.gsub(originaltext,emoteID,"-00",1) showEmotes(text,emote,emoteID) end end addEvent("triggerChat",true) addEventHandler("triggerChat",root,showEmotes) function getImageOffsets(text) lines = getChatboxLayout()["chat_lines"] local chatboxscale = getChatboxLayout()["text_scale"] local fontint = getChatboxLayout()["chat_font"] scaleX = getChatboxLayout()["chat_scale"][1] scaleY = getChatboxLayout()["chat_scale"][2] if fontint == 0 then font = "default" end if fontint == 1 then font = "clear" end if fontint == 2 then font = "default-bold" end if fontint == 3 then font = "arial" end fontheight = dxGetFontHeight(chatboxscale,font) local width = (dxGetTextWidth(text,chatboxscale,font)+chatxoffset)*scaleX return width end local screenWidth, screenHeight = guiGetScreenSize ( ) chatxoffset = screenWidth * 0.0145 chatyoffset = screenHeight * 0.0145 function createText ( ) for index,item in ipairs(emotes) do local line = item[3] local width = item[2] local height = (chatyoffset + (line-1)*fontheight)*scaleY if (item[3]<1) then table.remove(emotes,index) else dxDrawImage(20,20, width, height, "a.png",0,0,0,tocolor(255,255,255,255),true) end end end function emotesOnOff() if emotesVisible then removeEventHandler ( "onClientRender", root, createText ) emotesVisible = false else addEventHandler ( "onClientRender", root, createText ) emotesVisible = true end end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) emotesVisible = true addCommandHandler ("emotes", emotesOnOff ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) function onClientChatMessageHandler(text) local width = getImageOffsets(text) local chatwidth = getChatboxLayout()["chat_width"]*317*scaleX local multiplier = math.floor(width/chatwidth)+1 for index,item in ipairs(emotes) do if item[4] then item[3] = item[3]-1*multiplier end item[4] = true end end addEventHandler("onClientChatMessage", getRootElement(), onClientChatMessageHandler) Maybe its this
  13. You want to be all same location?
  14. Can you take ss when do it i want to see something also i want be on back view of the vehicle
  15. What is the problem now?
  16. addEventHandler("onPlayerLogin", root, function() bindKey(source, "l", "down", lights) bindKey(source, "j", "down", engine) end) addEventHandler("onResourceStart", resourceRoot, function() for _, v in pairs (getElementsByType("player")) do bindKey(v, "l", "down", lights) bindKey(v, "j", "down", engine) end end) --//Engine On / Off function engine (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleEngineState (vehicle) == true then setVehicleEngineState (vehicle, false) outputChatBox ("Motor ligado!", src, 255, 0, 0) else setVehicleEngineState (vehicle, true) outputChatBox ("Motor desligado!", src, 0, 255, 0) end else return false end end addCommandHandler ("motor", engine) --//-- --//Vehicle Lights function lights (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("Luzes ligadas!", src, 0, 255, 0) else setVehicleOverrideLights (vehicle, 1) outputChatBox ("Luzes desligadas!", src, 255, 0, 0) end else return false end end addCommandHandler ("luzes", lights)
  17. addEventHandler("onPlayerLogin", root, function() bindKey(source, "l", "down", lights) bindKey(source, "j", "down", engine) end) addEventHandler("onResourceStart", resourceRoot, function() for _, v in pairs (getElementsByType("player")) do bindKey(v, "l", "down", lights) bindKey(v, "j", "down", engine) end end) --//Engine On / Off function engine (src, cmd) if getPedOccupiedVehicle (src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleEngineState (vehicle) == true then setVehicleEngineState (vehicle, false) outputChatBox ("Motor ligado!", src, 255, 0, 0) else setVehicleEngineState (vehicle, true) outputChatBox ("Motor desligado!", src, 0, 255, 0) end else return false end end addCommandHandler ("motor", engine) --//-- --//Vehicle Lights function lights (src, cmd) if getPedOccupiedVehicle (src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("Luzes ligadas!", src, 0, 255, 0) else setVehicleOverrideLights (vehicle, 1) outputChatBox ("Luzes desligadas!", src, 255, 0, 0) end else return false end end addCommandHandler ("luzes", lights)
  18. try /debugscript 3 and see
  19. addEventHandler("onPlayerLogin", root, function() bindKey(source, "l", "down", lights) bindKey(source, "j", "down", engine) end) addEventHandler("onResourceStart", resourceRoot, function() for _, v in pairs (getElementsByType("player")) do bindKey(v, "l", "down", lights) bindKey(v, "j", "down", engine) end end) --//Engine On / Off function engine (src, cmd) if getPedOccupiedVehicle (src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleEngineState (vehicle) then setVehicleEngineState (vehicle, false) outputChatBox ("Motor ligado!", src, 255, 0, 0) else setVehicleEngineState (vehicle, true) outputChatBox ("Motor desligado!", src, 0, 255, 0) end else return false end end addCommandHandler ("motor", engine) --//-- --//Vehicle Lights function lights (src, cmd) if getPedOccupiedVehicle (src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("Luzes ligadas!", src, 0, 255, 0) else setVehicleOverrideLights (vehicle, 1) outputChatBox ("Luzes desligadas!", src, 255, 0, 0) end else return false end end addCommandHandler ("luzes", lights)
  20. onClientClick -- Event getCursorPosition moveObject
  21. onClientClick -- Event getCursorPosition getElementPosition setElementPosition
  22. function setAdminNick(thePlayer, commandName, targetPlayer, name) if getElementData(thePlayer, "fejlesztoBejelentkezve", true) then if not (targetPlayer) then outputChatBox("#F74B4B[Rendszer] #FFFFFF: Helyes használat : / " .. commandName .. " [Név / ID] [Admin név]", thePlayer, 255, 255, 255, true) else local targetPlayer, targetPlayerName = exports.Adminsystem:findPlayer(thePlayer, targetPlayer) local queryHandler = dbQuery(con, 'SELECT * FROM accounts') local result = dbPoll(queryHandler, 500) local ID = getElementData(thePlayer, "acc:id") for num, row in pairs(result) do if (row.id == ID) then local name = getPlayerName(targetPlayer) local adminname = setElementData(targetPlayer, "adminnick", name) dbExec(con, "UPDATE accounts SET adminnick=?", adminname) outputChatBox("#F74B4B[Rendszer] #FFFFFF: Sikeresen beállítottad: #F74B4B" .. targetPlayerName:gsub("_"," ") .. " #FFFFFFadminisztrátori nevét : #F74B4B" ..getElementData(targetPlayer, "adminnick").. "#FFFFFF.", thePlayer, 255, 255, 255, true) end end end end end Try this
  23. addEvent("adatokLekerdezese", true) addEventHandler("adatokLekerdezese", resourceRoot, function(serial) local queryHandler = dbQuery(con, 'SELECT * FROM accounts') local result = dbPoll(queryHandler, 500) local serial = getPlayerSerial(client) for num, row in paits(result) do if ( row.serial == serial) then setElementData(client, "admimlvl", tostring(row.adminlvl)) else end end end ) Try this
  24. function onPlayerSaveSkin() local playerAcc = getPlayerAccount(source) if not isGuestAccount(playerAcc) then local playerSkin = getElementModel(source) setAccountData(playerAcc, "skin", tostring(playerSkin)) end end addEventHandler("onPlayerQuit", root, onPlayerSaveSkin) function onPlayerLoadSkin(thePlayer) local playerAcc = getPlayerAccount(thePlayer) local playerSkin = tonumber (getAccountData(playerAcc, "skin")) createPed(playerSkin or 0 ,-1600.9000244141,-1620.6999511719,36.599998474121,0) end addEvent("makePed", true) addEventHandler("makePed", root, onPlayerLoadSkin) function onPlayerCheckSkin() triggerServerEvent("makePed", root , localPlayer) end addEventHandler("onClientResourceStart", resourceRoot , onPlayerCheckSkin)
×
×
  • Create New...