Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/06/20 in all areas

  1. it's buged, you cannot write "@" symbol
    1 point
  2. I have a resource on community, what is similar, try it out. https://community.multitheftauto.com/index.php?p=resources&s=details&id=18102 Just change the "collisionsmoke" to "bullethitsmoke" in client.Lua, at line 24.
    1 point
  3. That's because there are two variables called (x, y) and the 2nd variables only will be called here Try this if playerTarget then local xp,yp,zp = getElementPosition(playerTarget) local x,y,distance = getScreenFromWorldPosition (xp,yp,zp+0.5) distance = 30 if getElementData(playerTarget,"bandit") then text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ) else text = string.gsub(getPlayerName(playerTarget), '#%x%x%x%x%x%x', '' ) end local w = dxGetTextWidth(text,distance*0.033,"default-bold") if w and x and y and text and distance then dxDrawText ( text.."("..(getDistanceBetweenPoints3D( xp,yp,zp, getElementPosition ( localPlayer )))..")",x-(w/5),y,x-(w/5),y,tocolor(100, 255, 100, 200),distance*0.033,"bankgothic") end end end);
    1 point
  4. 12 09 2017 do you recognize yourself? Feel old yet?
    1 point
  5. Em vez disso, use essa função: function getPlayerFromAccountID (id) if (tonumber (id)) then for i, player in ipairs (getElementsByType("player")) do if (getAccountID (getPlayerAccount(player)) == tonumber (id)) then return player end end end return false end É que está bem difícil entender sua lógica pois a indentação está terrível.
    1 point
  6. function getPlayersFromAccountData (data) if (not data) then return false end -- Se não tiver data no parâmetro, retorna false. local dataPlayers = {} -- Inicia uma table vazia. for i, player in ipairs (getElementsByType ("player")) do -- Para cada jogador conectado no servidor, faça: if (getAccountData (getPlayerAccount(player), data) > 0) then -- Se o jogador possui a accountData específica maior que 0, então: table.insert (dataPlayers, player) -- Adiciona esse jogador na table dataPlayers end end return dataPlayers -- Retorna uma lista de jogadores que possuem a accountData específica. Retornará uma lista vazia se ninguém possuir tal accountData. end
    1 point
  7. Recently @Tut and I were experimenting about lightmapping with a light map and a shader (Very different from vertex lighting) and i want to share our experience with that. Initially we only wanted to make the 2nd UV channel work with objects but then i remembered about @Ren_712 lightmapped "Dust" map from counter strike and i wanted to re-create that effect. I thought his instructions were a bit unclear, so i write it down here again. If an Admin reads this, please move this topic to User Guides, i think thats better than this scripting tutorial section. This is the original resource of Ren: https://community.multitheftauto.com/index.php?p=resources&s=details&id=12151 In 3ds max, first you need an object that you want to assign the 2nd UV map to. Doesnt matter what object. -Create the "unwrap uvw" modifier -Select "2" as Map Channel in the modifier -In the following Dialog, "Move" or "Abandon" the UV coordinates of Channel 1 to the new Channel 2, you will most likely need to use "Flatten mapping" anyway -Do whatever you need with the new UVs (Flatten mapping makes everything fit on 1 texture = no more "tiling") -Create the lightmap with whatever tool (Radiosity?) that can render the light onto a grayscale lightmap image. This image will later produce light with our 2nd flattened UV map. -Right click on the object and "Convert to -> Editable mesh", this collapses everything nicely and saves your changes. -Finish your object and then export it with rwio or Kams max scripts. This is the lightmap shader created by Ren, its nothing special and i simplified the code a little bit and i added some comments: https://www.dropbox.com/scl/fi/mlcev0quowyccpcl3vnrr/light.fx?rlkey=um6t3lzwz5xwjm4i5bqbepah5&dl=0 Now all you need to do is assign the lightmap shader to your object with the following simple code: local lshader = dxCreateShader("light.fx") if lshader then local lightTexture = dxCreateTexture("your_lightmap.png", "argb") if lightTexture then dxSetShaderValue(lshader, "lightTexture", lightTexture) engineApplyShaderToWorldTexture(lshader, "*", THE_TARGET_OBJECT_THAT_NEEDS_LIGHT) end end
    1 point
  8. sure am gonna try to find out what's the wrong and tell u
    1 point
  9. طبيعي كل مبرمج يبدأ يأخذ مودات ويغير حقوق بعدين يعدل بالمودات , شوي بالكلام وشوي باللوحة ثم ينتقل للمرحلة الي بعدها , ويبدأ يصنع مودات خفيفة وآخر شيء يتطور مع الوقت
    1 point
  10. Calling them complete idiots are not way to go too.
    1 point
×
×
  • Create New...