Dimos7

Members
  • Content Count

    1,527
  • Joined

  • Last visited

Community Reputation

85 Popular

About Dimos7

  • Rank
    Loc
  • Birthday 09/02/1994

Details

  • Location
    Greece

Recent Profile Visitors

3,100 profile views
  1. Dimos7

    [HELP] How to fix this bug?

    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
  2. Dimos7

    [HELP] How to fix this bug?

    You want to be all same location?
  3. Dimos7

    [HELP] Engine on/off

    Can you take ss when do it i want to see something also i want be on back view of the vehicle
  4. Dimos7

    [HELP] Engine on/off

    What is the problem now?
  5. Dimos7

    [HELP] Engine on/off

    Wired
  6. Dimos7

    [HELP] Engine on/off

    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)
  7. Dimos7

    [HELP] Engine on/off

    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)
  8. Dimos7

    [HELP] Engine on/off

    try /debugscript 3 and see
  9. Dimos7

    [HELP] Engine on/off

    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)
  10. Dimos7

    [HELP] Move object with cursor

    onClientClick -- Event getCursorPosition moveObject
  11. Dimos7

    [HELP] Move object with cursor

    onClientClick -- Event getCursorPosition getElementPosition setElementPosition
  12. Dimos7

    MYSQL gives boolean value

    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
  13. Dimos7

    MYSQL gives boolean value

    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
  14. 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)
  15. Dimos7

    Skin CJ and face

    No