Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/12/20 in all areas

  1. بعد سنوات من الخبرة في عالم البرمجة النصية، لقد فرصة لإنشاء هذا السيناريو. مع الاحتمالات نحصل على 128 ^ 16 = 5,192,296,858,534,827,628,530,496,329,220,096 . هذا العدد الكبير هو كم من يحاول يجب أن يكون القراصنة للحصول على المفتاح الصحيح ، لا ننسى أنه من السهل جدا لتغيير المفتاح إذا كان لديك شيء شك. [+] السكريبت يقوم بتحميلها على لاعب ينضم إلى السرفر مع سكريبتات مشفرة و لا يمكن سرقتها . دعونا اختباره كم من الوقت يستغرق للقضاء على هذا الحدث كلمة المرور باستخدام الكمبيوتر من 2020 ASCII caracters are: Images: CONTACT: Ridden#2028 من فضلك لا ترد على هذا الموضوع للحديث عن السعر لأنه سيتم تجاهلك ، فقط اتصل بي على الشقاق وإذا لم يكن لديك خلاف أنا لن أقول أن النماذج الخاصة بك هي 100% آمنة ومستحيل الإختراق لهم ولكن هذا السيناريو سيجعل نماذجك جدا جدا جدا جدا من الصعب جدا الإختراق.
    1 point
  2. function isMouseInPosition ( x, y, width, height ) -- Função útil. Serve pra verificar se o mouse está dentro de determinada área ou não. if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) return ( ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) ) end addEventHandler ("onClientRender", root, function () dxDrawImage (x*400, y*100, x*233, y*214, "teste.png", 0, 0, 0, (isMouseInPosition (x*400, y*100, x*233, y*214) and tocolor (255, 255, 255, 240) or tocolor (255, 255, 255, 100))) end) -- O alpha do botão ficará em 240 quando o mouse estiver em cima da imagem e 100 quando não estiver.
    1 point
  3. Replacing model is handled by engineReplaceDFF and spawning variants is handled by setVehicleVariant. I'm not able to offer any advice on a scripting level.
    1 point
  4. They are components that are children of dummy chassis_dummy and a maximum of 6 can be spawned. They are named extra0 through extra5. These components have static positions and rotates along the vehicle, so you can't make them child of trunks or specific vehicle parts. You can add vehicle variants through a modeling software.
    1 point
  5. See above advice it will help get you started. Another way of doing it is add all custom parts in the DFF and hiding the components with a shader or setting unused elements position to somewhere far out of view.
    1 point
  6. As this does not seem like an advert nor a scripting question I'll give this a lock.
    1 point
  7. If you refer to the spoiler you could put it on a default spoiler of the game and use attachElements or implement it as a variant on infernus which is a bit complicated if you are a beginner
    1 point
  8. You can for example create an object (server), use projectile model: https://wiki.multitheftauto.com/wiki/CreateObject Move the object (server): https://wiki.multitheftauto.com/wiki/MoveObject And when it hits something (client), checking with this function every frame: https://wiki.multitheftauto.com/wiki/IsLineOfSightClear https://wiki.multitheftauto.com/wiki/OnClientRender Than you trigger to serverside and make an explosion: https://wiki.multitheftauto.com/wiki/CreateExplosion And yes it is not easy. If not an overwrite: The player that creates the projectile: projectile createProjectile ( element creator, int weaponType [, float posX, float posY, float posZ, float force = 1.0, element target = nil, float rotX, float rotY, float rotZ, float velX, float velY, float velZ, int model ] ) https://wiki.multitheftauto.com/wiki/CreateProjectile If the vehicle creates it, the owner should be either the vehicle controller or the syncer.
    1 point
  9. تسلم يدك يابطل تقبل مروري
    1 point
  10. Introduction Vehicle indicators are mostly seen on other GTA modifications where the mod 'IVF - Improve Vehicle Features' is compatible. This mod allows for light modifications such as police flashlights, custom LED flashers, indicators and much more. These features are sought after by MTA roleplaying servers a lot. This guide aims to introduce 3D modelers to prepare models for customisable lights, which then requires coded shaders to work. Anything related to scripting is not included in this guide. The guide assumes that the modeler has basic understanding of importing and exporting models. Editing existing Huntley for indicator lights With Huntley imported into 3ds Max, isolate the mesh called 'chassis' as it is the only component that needs working lights. As seen the car has 4 lights; right tail light, left tail light, right headlight and left headlight. All 4 has their own material assigned for them to act each their own way. The material color codes are hardcoded in the game telling it when to show illuminated brake lights for when the car brakes and so on. For this custom vehicle however, any geometry meant for custom vehicle lighting needs white color code and a custom texture name for shadering to work. Before anything, it's required to get the custom lighting texture ready. For this guide, vehiclelights128 and its illuminated version works perfectly fine. These needs be renamed to customRRLightsOff and customRRLightsOn and so forth. The 'RR' is for 'right rear', where as 'LR' would be 'left rear'. This needs be done for front too, so in total 4 'off' images are needed while only one 'on' is needed, as it can simply be instanced when shadering. Below is a step-step process on editing Huntley's geometry and adding custom indicators. Add an 'Editable Poly' modifier to the model. Press '5' key on keyboard which enables 'Select by Element'. Select the two rear light meshes, ensure they are both highlighted. On 'Modify Panel' scroll down and find 'Slice Plane', click that. This creates a rectangle that has a line-preview for the cut. Align the plane to the lights and create two cuts for the indicator lights. Select one side of the geometry that was cut by using 'Select by Polygon'. On the modifier stack, click 'Collapse all', leaving only 'Editable mesh' on the stack. Press 'M' key for 'Material browser'. Create a new GTA material. In the texture slot, add in the 'customRRLightsOff'. On material browser, click 'Assign material to Selection'. Note that this needs be done for the left side too but with different material and texture. Apply a new modifier on the model called 'Unwrap UVW'. Press 'Open UV editor'. On the UV editor, enable 'Select by polygon'. Grab the UV island and drag it onto the orange section of the image, which is for indicator lights. On modifier stack, collapse all, to save the new UV's. Above: example of what can be achieved. Front lights section already has indicator lights, so all that needs doing is 2 new materials with each their own light texture, like done on rear side. The 4 new textures needs be added to the car's .txd file. Model is now ready for export. Now all that's needed is MTA scripting for the light shaders to work. Exact same process can be applied for creating custom emergency lights. Note that it is not necessary to have these 128x128 textures in the model. They can be downscaled to 4x4 in the .txd and then a MTA shader script can apply the originals, which greatly reduces the size of download. This means it'll download 4 images which are then instanced onto every custom model using the lights. To put it short, each .txd will have 4 placeholder-images of 4x4 resolution rather than 4 images of 128x128 resolution.
    1 point
  11. You need a color shader, or a renderTarget -> draw the texture image then draw one rectangle with the selected color -> create texture from the renderTarget pixels then destroy renderTarget. What did I say before? function changeTextureColor(textureElement, red, green, blue, alpha) local textureWidth, textureHeight = dxGetMaterialSize(textureElement) -- get the texture size local tempRenderTarget = dxCreateRenderTarget(textureWidth, textureHeight) -- create render target with texture size dxSetRenderTarget(tempRenderTarget) -- start rt dxDrawImage(0, 0, textureWidth, textureHeight, textureElement) -- draw the texture image to the rt dxDrawRectangle(0, 0, textureWidth, textureHeight, tocolor(red, green, blue, alpha)) -- draw the selected color rectangle to the rt -- you can add custom texts to texture etc.. dxSetRenderTarget() -- end rt local rt_pixels = dxConvertPixels(dxGetTexturePixels(tempRenderTarget), "png") -- get the rt pixels and convert to png destroyElement(tempRenderTarget) -- destroy rt because I converted to texture return dxCreateTexture(rt_pixels) -- return the new texture element end Or the shader way (I dont tested the shader): float red; float green; float blue; float alpha; technique colorChange { pass P0 { MaterialAmbient = float4(red, green, blue, alpha); } } -- You need to divide the r/g/b with 255 because shader color float range is 0-1. local selectedRed = 128 local selectedGreen = 64 local selectedBlue = 32 local selectedAlpha = 200 dxSetShaderValue(colorChangeShader, "red", selectedRed / 255) dxSetShaderValue(colorChangeShader, "green", selectedGreen / 255) dxSetShaderValue(colorChangeShader, "blue", selectedBlue / 255) dxSetShaderValue(colorChangeShader, "alpha", selectedAlpha / 255) -- then apply the shader to the world texture
    1 point
  12. بخصوص سيرفر شوتر عادي مافي شي مميز ? مودات غير حصرية ? حياكم mtasa://188.165.60.29:22043
    0 points
×
×
  • Create New...