SoManyTears

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About SoManyTears

  • Rank
    Newbie

Recent Profile Visitors

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

  1. problem solved.topic may be closed.
  2. Hello, I'm trying to add text on the ped.everything is good.text appears but when I approach the ped, the error comes from debug. ERROR :[Resources]\missionsped\client.Lua:199: attempt to perform arithmetic on local 'sy' (a nil value) How can ı solve this problem ? function pedText() local x, y, z = getElementPosition( dealer ) --ped position local x2, y2, z2 = getElementPosition(localPlayer) --player position local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) if yakinlas < 4 then local x2, y2, z2 = getElementPosition(localPlayer) lcal sx, sy = getScreenFromWorldPosition(x, y, z+0.9, 0.06) local yakinlas = getDistanceBetweenPoints3D(x,y,z, x2, y2, z2) local yaziboyut = 0.9 dxDrawText ( "Drug Dealer" , sx, sy - 30, sx, sy - 30, tocolor(255,255,255), math.min ( 0.3*(150/yakinlas)*1.4,1.3 - (0.5 + math.sin(math.rad(getTickCount())) / 3) / 12) * yaziboyut, "default-bold", "center", "bottom", false, false, false, true ) end end --end addEventHandler("onClientRender", root, pedText)
  3. Hello, I installed an mta server in ubuntu.How do I get back to the mta terminal after shutdown?I am new yet and if anyone knows, can you tell me?I installed screen, but screen -r doesn't work after the shutdown
  4. How can I turn a texture ON and OFF with just one command?Texture needs to be active when they enter the server.This is what confuses me. addEventHandler('onClientResourceStart', resourceRoot, function() shader = dxCreateShader('shader.fx') terrain = dxCreateTexture('img/road.jpg') dxSetShaderValue(shader, 'gTexture', terrain) engineApplyShaderToWorldTexture(shader, 'cj_rubbish1') engineApplyShaderToWorldTexture(shader, 'sf_junction2') engineApplyShaderToWorldTexture(shader, ':Oroad01_law') engineApplyShaderToWorldTexture(shader, 'des_1line256') engineApplyShaderToWorldTexture(shader, 'concretebig4256128') end )
  5. I tried a few more events but failed.I just want the health bar to appear when I "aim" on ped.Now health bar looks without aim with gun! how can ı really do that ?Please help someone? function pedHealthbar() for k, peds in pairs(getElementsByType("ped", root, true)) do if getElementData(peds, "type") == "Secur.ped" then target = getPedTarget(peds) if ( target ) then local recBar = dxDrawRectangle(sX+420, sY-600,150, 12, tocolor(0, 0, 0, 200)) local health = getElementHealth(peds) local lineLength = 144 * (health / 100) local healthBar = dxDrawRectangle(sX+423, sY-597,lineLength, 7, tocolor(46, 139, 87, 210)) dxDrawText("Security", sX+460, sY-627, sX+155, sY-19-(32*7), tocolor(0,0,0, 255), 1.6, font, "left", "top") dxDrawText("Security", sX+461.5, sY-625.5, sX+153.5, sY-17.5-(32*7), tocolor(255, 255, 255, 255), 1.6, font, "left", "top") end end end addEventHandler("onClientRender", root, pedHealthbar)
  6. Hi Forum,ı want to say that ı am new in scripting and now ı am starting to try element datas.ı want to add rank in scoreboard acording to the number of levels.ı know ı cant do the codes below.can someone give me an example how can ı do this ? ı just want to show it on the scoreboard.Thank you from now. exports.scoreboard:addScoreboardColumn('Rank') addEventHandler("onPlayerSpawn",root, function() if getElementData(source,"level") >= 1 then setElementData(source, "Rank", "test") elseif getElementData(source,"level") >= 5 then setElementData(source, "Rank", "test1") elseif getElementData(source,"level") >= 10 then setElementData(source, "Rank", "test2") elseif getElementData(source,"level") >= 15 then setElementData(source, "Rank", "test3") elseif getElementData(source,"level") >= 20 then setElementData(source, "Rank", "test4") elseif getElementData(source,"level") >= 25 then setElementData(source, "Rank", "test5") end end ) addEventHandler("onPlayerSpawn",root, function () local rank = getElementData(source,"level") if rank then setElementData(source,"Rank", rank) end end )