• Content count

  • Joined

  • Last visited

Community Reputation

8 Neutral


About Tommy.

  • Rank
  • Birthday 03/05/2001


  • Gang
  • Location
    Blumenau - Brazil
  • Occupation
  • Interests
    Girls O.o

Recent Profile Visitors

694 profile views
  1. Opa, fiz aqui pra você (: client-side: local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) serverName = "Nome do Servidor" addEventHandler("onClientRender", root, function() local time = getRealTime() local day = time.monthday local month = time.month local year = time.year + 1900 dxDrawText(serverName.."\1-\1FPS: "..getElementData(getLocalPlayer(), "fps").."\n""/"..month.."/"..year.."\1-\1"..getTimeS(), x*1190, y*723, x*1360, y*757, tocolor(255, 254, 254, 150), x*1.00, "clear", "right", "center", false, false, false, true, false) end ) function getTimeS() local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second if (hours >= 0 and hours < 10) then hours = "0"..time.hour end if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end if (seconds >= 0 and seconds < 10) then seconds = "0"..time.second end return hours..":"..minutes..":"..seconds end local fps = false function getCurrentFPS() -- Setup the useful function return fps end local function updateFPS(msSinceLastFrame) -- FPS are the frames per second, so count the frames rendered per milisecond using frame delta time and then convert that to frames per second. fps = (1 / msSinceLastFrame) * 1000 end addEventHandler("onClientPreRender", root, updateFPS) local function getAverageFPSOfFPSArray(table) -- Average FPS = (FPS1 + FPS2 + ... + FPSX) / X local totalFPS = 0 for _, fps in pairs(table) do totalFPS = totalFPS + fps end return totalFPS / #table end local currentSecondFPS = {} local lastSecondTicks = getTickCount() local lastFiveSecondsFPS = {} local function smoothFPS() -- Do we have a FPS rate already? if not getCurrentFPS() then return end -- Insert current FPS into a table for reference table.insert(currentSecondFPS, getCurrentFPS()) -- If a second passed, get the average FPS using the table -- (We always have at least one frame rendered, so dividing by 0 it's not a problem) if getTickCount() - lastSecondTicks >= 1000 then local averageFPSPerSecond = getAverageFPSOfFPSArray(currentSecondFPS) -- Reset variables currentSecondFPS = {} lastSecondTicks = getTickCount() -- Update the table containing last five seconds FPS -- Also update the FPS limit accordingly table.insert(lastFiveSecondsFPS, averageFPSPerSecond) -- Silently discard too old average FPS if #lastFiveSecondsFPS == 6 then table.remove(lastFiveSecondsFPS, 1) end -- Get the average FPS of the average FPS of each of the last five seconds, and use the result as the frame limit setElementData(localPlayer, "fps", (math.ceil(getAverageFPSOfFPSArray(lastFiveSecondsFPS)))); -- Sets elementData "fps" end end addEventHandler("onClientHUDRender", root, smoothFPS)
  2. Tommy.

    [HELP] Hud script

    try this if isPlayerMapVisible () then return end not tested
  3. Thank so much <3
  4. Tommy.

    Please help

    local gPName = getPlayerName(getLocalPlayer()) dxDrawText(gPName.." text", screenW * 0.2291, screenH * 0.1966, screenW * 0.7716, screenH * 0.2552, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, true, false)
  5. Tommy.

    How to make this script?

    --SERVER-SIDE function getAccount() local acc = getAccountName(getPlayerAccount(source)) triggerClientEvent(source, "sendAcc", source, acc) end addEvent("getAcc", true) addEventHandler("getAcc", root, getAccount) ---------------------------------------------------------------------- --CLIENT-SIDE triggerServerEvent("getAcc", localPlayer) addEvent("sendAcc", true); addEventHandler("sendAcc", root, function(acc) account = acc or "N/A" end) EDIT: Not tested
  6. Tommy.


    use: table.insert
  7. Tommy.

    [HELP] ACL Group Vehicles

    function enterVehicle (player, seat, jacked) local accName = getAccountName (getPlayerAccount (player) if not isObjectInACLGroup("user."..accName, aclGetGroup ( "Admin" )) and getElementModel(source) == 411 then --Edit Acl and Vehicle ID cancelEvent() outputChatBox ( "*You are not allowed to drive this vehicle.", player) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) EDIT: Not tested
  8. Tommy.

    [HELP] Find System

    function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function blipPlayer(command, playerName) if playerName then if getPlayerFromPartialName(playerName) then local player = getPlayerFromPartialName(playerName) local blip = createBlipAttachedTo(player, 41) end end end addCommandHandler("find", blipPlayer) EDIT: Not tested
  9. Tommy.

    Local Shouts

    chat_range=50 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"L","down","chatbox","L") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"L","down","chatbox","L") 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,_,msg) local px,py,pz=getElementPosition(player) local nick=getPlayerName(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox(nick.." #ffffffShouts "..msg,v,30,30,200,true) end end end addCommandHandler("L",onChat) @Solidsnake14
  10. Tommy.

    [HELP] dxGridList

    It worked,
  11. Tommy.

    [Help] 2 textures in 1 object

    Hi guys, how do I get 2 textures in 1 object? CSGO Example: Two skin on M4A4 (Assimov - Howl) One player has the skin Assimov and the other Howl The one with Howl sees Howl but also sees the other player's Assimov. [I do not know if you can understand, sorry for my English]
  12. Tommy.


    how can I do to verify that the password has changed on the site? or do I put it every time I log in he sets the password?
  13. Tommy.


    Does anyone know how to change the password of the account through the site and change it in internal.db? In the site I managed to do but only change in the site DB. Sorry for my english.
  14. Tommy.

    Panel opening on Ped Click

    If the player clicks the ped with the id 1 it open the panel SERVER-SIDE: -- IDSkin, "id number", x, y, z, r peds = { {0, "1", 0, 0, 13, 0} } for i = 1, #peds do ped = createPed(peds[i][1], peds[i][3], peds[i][4], peds[i][5]) setElementRotation(ped, 0, 0, peds[i][6]) setElementData(ped, "id", peds[i][2], true) end CLIENT-SIDE function clickPed(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if (clickedElement) and (getElementType(clickedElement) == "ped" ) then local x, y, z = getElementPosition(getLocalPlayer()) local wx, wy, wz = getElementPosition(clickedElement) local jij = getLocalPlayer() if (getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3) and (button == "left") and (state == "down" ) then local ped = getElementData(clickedElement, "id") if (ped == "1") then --FUNCTION PANEL end end else return end end addEventHandler("onClientClick", getRootElement(), clickPed, true)
  15. Tommy.

    [HELP] How to play sound from YouTube?

    use createBrowser and put a site that generates a link .mp3