Jump to content

iiv03

Members
  • Posts

    476
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by iiv03

  1. i did but not give one avatar pictures for i, player in ipairs(getElementsByType("player")) do local avatar = getElementData(player, "avatarHash") or false if (not loadedTexture[player]) then if avatar then local path = ":avatars/avatarcache/"..avatar if fileExists(path) then loadedTexture[player] = dxCreateTexture(path) else loadedTexture[player] = false end end end end local avatar = loadedTexture[player] or tes.defaultAvatar dxSetShaderValue(tes.maskShader, "imageTexture", avatar) dxDrawImage(x * (1312/sx), y * (722/sy) + offsetY, x * (25/sx), y * (50/sy), tes.maskShader,0,0,0, tocolor(255,255,255,255*toptimes.progress), false) in first code he was giving like this what's wrong?
  2. hey I have a problem in loop between players problem that the picture is repeated and I do not want to be repeated everyone i want one picture how? for i, player in ipairs(getElementsByType("player")) do local avatar = getElementData(player, "avatarHash") or false if (not loadedTexture[player]) then if avatar then local path = "avatars/avatarcache/"..avatar if fileExists(path) then loadedTexture[player] = dxCreateTexture(path) else loadedTexture[player] = false end end end local avatar = loadedTexture[player] or tes.defaultAvatar dxSetShaderValue(tes.maskShader, "imageTexture", avatar) dxDrawImage(x * (1312/sx), y * (722/sy) + offsetY, x * (25/sx), y * (50/sy), tes.maskShader,0,0,0, tocolor(255,255,255,255*toptimes.progress), false) end
  3. i put 325 too before and nothing too engineSetModelLODDistance(elementID, eventName == "onClientResourceStart" and 325 or 100) addEvent("onSettingChange", true) addEventHandler("onSettingChange", localPlayer, function(variable, value) if variable == "draw_distance" then local state = not (value == "Off") draw.setVisible(state, true) end end) function draw.setVisible(visible, notifyDisplay) draw.visible = visible and true or false if draw.visible then removeEventHandler("onClientResourceStart", root,draw.changeDistance) addEventHandler("onClientResourceStart", root,draw.changeDistance) end if notifyDisplay then triggerEvent("notification:create", localPlayer, "Draw distance", "is now "..(draw.visible and "ON" or "OFF")) end end function draw.changeDistance() for i,object in pairs(getElementsByType("object")) do if isElement(object) then local elementID = getElementModel(object ) engineSetModelLODDistance(elementID, eventName == "onClientResourceStart" and 325 or 100) end end end Anyone guys?
  4. i tried some and I couldn't find any solution function draw.setVisible(visible, notifyDisplay) draw.visible = visible and true or false if draw.visible then removeEventHandler("onClientResourceStart", root,draw.changeDistance) addEventHandler("onClientResourceStart", root,draw.changeDistance) end if notifyDisplay then triggerEvent("notification:create", localPlayer, "Draw distance", "is now "..(draw.visible and "OFF" or "ON")) end end function draw.changeDistance() for i,object in pairs(getElementsByType("object")) do if isElement(object) then local elementID = getElementModel(object ) engineSetModelLODDistance(elementID, eventName == "onClientResourceStart" and 1000 or 0) end end end addEventHandler("onClientResourceStart", root,draw.changeDistance)
  5. سلامات! الحين تتحدثون ب مشكله ثانيه ولا سالفه حقتي؟
  6. المود https://github.com/Necktrox/mta-discord-bot/tree/master/mta
  7. hey everybody, have a problem in function im trying to do engineSetModelLODDistance ON/OFF but nothing well I could not find any error in debugscript what's problem function draw.setVisible(visible, notifyDisplay) draw.visible = visible and true or false if draw.visible then removeEventHandler("onClientResourceStart", root,draw.changeDistance) addEventHandler("onClientResourceStart", root,draw.changeDistance) end if notifyDisplay then triggerEvent("notification:create", localPlayer, "Draw distance", "is now "..(draw.visible and "OFF" or "ON")) end end function draw.changeDistance() for i,object in pairs(getElementsByType("object")) do if isElement(object) then local elementID = getElementModel(object ) engineSetModelLODDistance(elementID,1000) end end end
  8. سلام عليكم ورحمة الله وبركاته اليوم بصمم سكربت الي يرسل شات لديسكورد بس طلع لي مشكله المشكله انه اذا انك انت كتبت شي ب حرف جي مايطلع كلام ب ديسكورد قد ماحولت تجيني مشكله addEventHandler("onResourceStart", root, function (message, messageType) for i, player in pairs(getElementsByType("player")) do bindKey(player, "G", "down", "chatbox", "global") if messageType == 0 then exports.discord:send("chat.message.text", { author = getPlayerName(source), text = message }) end end end) function doGlobalChat( player, command, ...) triggerEvent("onPlayerChat", player, table.concat({...}, " "), 3) end addCommandHandler("global", doGlobalChat) كذا يشتغل بس علي حرف T addEventHandler("onPlayerChat", root, function (message, messageType) for i, player in pairs(getElementsByType("player")) do bindKey(player, "G", "down", "chatbox", "global") if messageType == 0 then exports.discord:send("chat.message.text", { author = getPlayerName(source), text = message }) end end end) لاتبخلون حل بالله
  9. hello everybody I have some questions to link server with bot discord I heard it works on vps Is that true?, well can I try it through windows? like cmd i tired some attempt and failed and i don't know the reason why { "port": 22003, "passphrase": "key", "guild": "guild.id", "bots": [{ "channel": "testing", "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }] } there is config.json I know its have mistakes but I'm not an expert on this <discord> <channel>testing</channel> <passphrase>equal-to-the-server-passphrase</passphrase> <hostname>localhost</hostname> <port>22003</port> </discord> in this point i don't know what i put <passphrase>equal-to-the-server-passphrase</passphrase> help please
  10. here put my token? "token": "bot.token" > bot.token?
  11. hey i have a question in this point i did not understand what you mean <passphrase>equal-to-the-server-passphrase</passphrase> and where put my token bot?
  12. السلام عليكم بدي آفهم كيف اتصل ب لوا و جافا سكربت حق ديسكورد بغى مثال
  13. acpanel شغله اتوقع تفعيل حمايه للملفات مو معدله للعبه للآعبين GTA SA مثلن ممنوع تغير شكل انفرس او مباني شي كذا.
  14. شيدر #include "tex_matrix.fx" /////////////////////////////////////////////////////////////////////////////// // Global variables /////////////////////////////////////////////////////////////////////////////// texture sPicTexture; texture sMaskTexture; float2 gUVPrePosition = float2( 0, 0 ); float2 gUVScale = float( 1 ); // UV scale float2 gUVScaleCenter = float2( 0.5, 0.5 ); float gUVRotAngle = float( 0 ); // UV Rotation float2 gUVRotCenter = float2( 0.5, 0.5 ); float2 gUVPosition = float2( 0, 0 ); // UV position /////////////////////////////////////////////////////////////////////////////// // Functions /////////////////////////////////////////////////////////////////////////////// //------------------------------------------- // Returns UV transform using external settings //------------------------------------------- float3x3 getTextureTransform() { return makeTextureTransform( gUVPrePosition, gUVScale, gUVScaleCenter, gUVRotAngle, gUVRotCenter, gUVPosition ); } /////////////////////////////////////////////////////////////////////////////// // Techniques /////////////////////////////////////////////////////////////////////////////// technique hello { pass P0 { // Set up texture stage 0 Texture[0] = sPicTexture; TextureTransform[0] = getTextureTransform(); TextureTransformFlags[0] = Count2; AddressU[0] = Clamp; AddressV[0] = Clamp; // Color mix texture and diffuse ColorOp[0] = Modulate; ColorArg1[0] = Texture; ColorArg2[0] = Diffuse; // Alpha mix texture and diffuse AlphaOp[0] = Modulate; AlphaArg1[0] = Texture; AlphaArg2[0] = Diffuse; // Set up texture stage 1 Texture[1] = sMaskTexture; TexCoordIndex[1] = 0; AddressU[1] = Clamp; AddressV[1] = Clamp; // Color pass through from stage 0 ColorOp[1] = SelectArg1; ColorArg1[1] = Current; // Alpha modulate mask texture with stage 0 AlphaOp[1] = Modulate; AlphaArg1[1] = Current; AlphaArg2[1] = Texture; // Disable texture stage 2 ColorOp[2] = Disable; AlphaOp[2] = Disable; } } حبيبي أكواد مو ناقصه
  15. المشكله احس مب من شيدر المشكله من خريطه ليش يجي بق حاولت احله بس مقدرت وللحين ادور مساعده
  16. Poyraz أنت مروق؟ وش يضحك.
  17. ي طيب ولا واحد رد؟ وش وضع
  18. هلآ والله شباب انا مسوي رادار بس مشكله يجني بق ومسويه ب شيدر كمان بس مدري ليش يجني بق يعني في بحر الصور ايشش سالفه ؟ كود حقي addEventHandler( "onClientResourceStart", resourceRoot, function() hudMaskShader = dxCreateShader("hud_mask.fx") -- شيدر radarTexture = dxCreateTexture("img/map.png") -- صوره ماب maskTexture1 = dxCreateTexture("img/radar-background.png") -- صوره عاديه bAllValid = hudMaskShader and radarTexture and maskTexture1 if not bAllValid then outputDebugString( "LOGS: RADAR worked",0, 255,0,123 ) -- يشيك ب ديبوق رادار شغال else dxSetShaderValue( hudMaskShader, "sPicTexture", radarTexture ) -- شيدر dxSetShaderValue( hudMaskShader, "sMaskTexture", maskTexture1 ) -- شيدر end end) function radar() -- local xDiv, yDiv = posX/6000, posY/-6000 dxSetShaderValue(hudMaskShader, "gUVPosition", xDiv, yDiv) local camX, camY, camZ, tX, tY, tZ = getCameraMatrix() local north = findRotation(camX, camY, tX, tY) local northInv = 180 - north local xDiv, yDiv = posX/6000, posY/-6000 dxSetShaderValue(hudMaskShader, "gUVPosition", xDiv, yDiv) local zoom = 20 * radar.scale * radar.zoomScale radar.range = 3000/zoom local zoom = 7 dxSetShaderValue(hudMaskShader, "gUVScale", 1/zoom, 1/zoom) dxSetShaderValue(hudMaskShader, "gUVRotAngle", math_rad(-north)) if backgroundAlpha ~= 205 then dxDrawImage(radarX, radarY, radar.size, radar.size, hudMaskShader, 0, 0, 0, tocolor(255, 255, 255, 240 * radar.alpha), false) dxDrawImage(radarX, radarY, radar.size, radar.size, maskTexture1, 0, 0, 0, tocolor(14, 19, 26, 240 * radar.alpha), false) end else dxDrawImage(radarX, radarY, radar.size, radar.size, maskTexture1, 0, 0, 0, tocolor(14, 19, 26, 240 * radar.alpha), false) dxDrawImage(radarX, radarY, radar.size, radar.size, hudMaskShader, 0, 0, 0, tocolor(255, 255, 255, 240 * radar.alpha), false) end addEventHandler("onClientRender", root, radar)
  19. مشككككككككور ي حبيب
  20. كفو عليك كذا قصدي ومايوقف
  21. آول شي يعني تفتح تسوي حركه مثل كذا بعدين تنغلق وحده تسوي حركه كمان فهمت ول لسآ؟
×
×
  • Create New...