Jump to content

JCL

Members
  • Posts

    19
  • Joined

  • Last visited

3 Followers

Details

  • Gang
    ~AM~
  • Location
    morocco
  • Occupation
    make mods
  • Interests
    games design

Recent Profile Visitors

1,904 profile views

JCL's Achievements

Advanced Member

Advanced Member (8/54)

6

Reputation

  1. هدا المشكل يحدت معي في أي مرة أشغل الام تي أي قبل ما أضع سماعات الرأس. لدا حاول اعادة تشغيل ام تي أي. وادا لم يشتغل الصوت . حاول تنصيبه من جديد
  2. JCL

    Fast sprint script

    its client side script with custom animation combined with setPedAnimationSpeed. custom animation is just a standard animation edited a bit.
  3. JCL

    Fast sprint script

    use animation for that. you will get smooth fast run without accelerate the game and without glitchs like this mode :
  4. نسيت ازالة هدا السطر من الكود . كان لتجريب فقط print(1)
  5. function respawn_player_w(source,time) print(1) if isElement(source) and getElementType(source) == "player" then setElementAlpha(source, 100) setElementData(source, "SpawnProtected", true) toggleControl(source, "fire", false) setTimer(function () setElementData(source, "SpawnProtected", false) setElementAlpha(source, 255) toggleControl(source, "fire", true) end, time*1000, 1) return true else return false end end function call_spawn_function(ammo, attacker, weapon, bodypart) respawn_player_w(source,10); end addEventHandler('onPlayerWasted',root,call_spawn_function); حسنا جرب هدا الكود . عندما يموت الاعب انتضر 10 تواني
  6. الكود الدي وضعته انت هو جيد و ليس به اي خطأ. أعتقد مشكلتك هي طريقة استدعاء الفنكشن.
  7. your question is about lua language performance and not about dx rendering .
  8. JCL

    Help Me

    add it to acl via admin panel. or stop the server ----> add it to acl like what you did ----> start server
  9. this function dayzconnect:MySQL not exported well. Try to start dayzconnect game mode first then start dayzmode resource after. if that not worked , check if the function (dayzconnect:MySQL) exported well in dayzconnect meta.xml.
  10. JCL

    I Buy Server Toplist

    He went to eat. When he returns he will completes the question
  11. المشكلة في الوقت. فاغلب المبرمجين لديهم عملهم و في وقت فراغهم يكفيهم فقط للمساعدة في شيء أو دعم سرفراتهم
  12. JCL

    [help]Ghost Mode

    what is the problem ?
  13. JCL

    Help Me

    setResourceInfo : its a protected function and you must give it some rights to use it so , give admin right to GTWcore resource may solve your problem.
  14. Hi guys Some friends asked me about the code for gta v camera or at least similar one, so , here is the code for it : local camera_pan; local camera_tilt; local camera_temp_x; local camera_temp_y; local camera_temp_z; local camera_offset_x; local camera_offset_y; local camera_offset_z; local player_game_x; local player_game_y; local player_game_z; local first_enabled = 0; local mouse_move_x = 0; local mouse_move_y = 0; local camera_speed = 0.8; local enable_sidecamera = 1; localplayer = getLocalPlayer (); local fps = false; local function updateFPS(msSinceLastFrame) fps = (1 / msSinceLastFrame) * 1000; end addEventHandler("onClientPreRender", root, updateFPS) function check_gui_elements_visible() local windows = getElementsByType("gui-window") for i,window in pairs(windows) do if(guiGetVisible(window) == true) then return true end end return false; end function isPedAiming ( thePedToCheck ) if isElement(thePedToCheck) then if getElementType(thePedToCheck) == "player" or getElementType(thePedToCheck) == "ped" then if getPedTask(thePedToCheck, "secondary", 0) == "TASK_SIMPLE_USE_GUN" then return true; end end end return false; end function attach_camera(distance_x,distance_y) local is_any_gui_visible = check_gui_elements_visible(); if(is_any_gui_visible == true) then mouse_move_x = 0;mouse_move_y = 0;end if(isCursorShowing()) or (isConsoleActive()) or (isMainMenuActive()) or (isMTAWindowActive()) then mouse_move_x = 0;mouse_move_y = 0; end player_game_x ,player_game_y ,player_game_z = getElementPosition(localplayer); local time_step = 1; if(fps) then time_step = 1/fps; end camera_pan = camera_pan + 1 * mouse_move_x * time_step * 50; camera_tilt = camera_tilt + 1 * mouse_move_y * time_step * 50; if(camera_tilt > 0.8) then camera_tilt = 0.8; end if(camera_tilt < -2) then camera_tilt = -2; end local offset_x = player_game_x - distance_y * math.cos(camera_pan+180); local offset_y = player_game_y - distance_y * math.sin(camera_pan+180); local camera_x = offset_x - distance_x * math.cos(camera_pan); local camera_y = offset_y - distance_x * math.sin(camera_pan); local camera_z = player_game_z + 1 * -camera_tilt; camera_temp_x ,camera_temp_y,camera_temp_z = interpolateBetween (camera_temp_x,camera_temp_y,camera_temp_z,camera_x,camera_y,camera_z, camera_speed, "Linear"); camera_offset_x ,camera_offset_y,camera_offset_z = interpolateBetween (camera_offset_x,camera_offset_y,camera_offset_z,offset_x,offset_y,0, camera_speed, "Linear"); setCameraMatrix (camera_temp_x,camera_temp_y,camera_temp_z, camera_offset_x, camera_offset_y, player_game_z+0.5 ,0,100); end function camera_activation() if(enable_sidecamera == 1) then if(first_enabled == 0) then camera_pan = getPedCameraRotation(localPlayer)+180; first_enabled = 1; end local v = getPedOccupiedVehicle(localPlayer) if(v) then if(getCameraTarget () ~= v) then setCameraTarget (localPlayer); end else if(isPedAiming (localPlayer) == true) then if(getCameraTarget () ~= localPlayer) then setCameraTarget (localPlayer); end else attach_camera(1.5,-1); end end else first_enabled = 0; local v = getPedOccupiedVehicle(localPlayer) if(v) then if(getCameraTarget () ~= v) then setCameraTarget (v); end else if(getCameraTarget () ~= localPlayer) then setCameraTarget (localPlayer); end end end end addEventHandler ("onClientPreRender", getRootElement(), camera_activation); addEventHandler( "onClientCursorMove", getRootElement( ), function (x, y,_,_ ) local mouse_move_x2 = (0.5 - x) * 100; local mouse_move_y2 = (0.5 - y) * 100; mouse_move_x ,mouse_move_y = interpolateBetween (0,0, 0,mouse_move_x2,mouse_move_y2,0, 0.1, "Linear"); end ); Example Feel free to ask any question about the code.
×
×
  • Create New...