Jmaniacs Posted October 4, 2018 Share Posted October 4, 2018 Well, i dont know if can be possible to make a falling ped with a parachute, it can be possible? Link to comment
Dimos7 Posted October 4, 2018 Share Posted October 4, 2018 What do you mean you want make a ped failling from sky and use parachute? Link to comment
Master_MTA Posted October 4, 2018 Share Posted October 4, 2018 (edited) not impossible use: https://wiki.multitheftauto.com/wiki/CreatePed & https://wiki.multitheftauto.com/wiki/GivePedWeapon & https://wiki.multitheftauto.com/wiki/GetPedAnalogControlState enjoy +_+ Edited October 4, 2018 by Master_MTA 1 Link to comment
Jmaniacs Posted October 4, 2018 Author Share Posted October 4, 2018 On 04/10/2018 at 05:28, Master_MTA said: not impossible use: https://wiki.multitheftauto.com/wiki/CreatePed & https://wiki.multitheftauto.com/wiki/GivePedWeapon & https://wiki.multitheftauto.com/wiki/GetPedAnalogControlState enjoy +_+ Expand thanks, will i try it Link to comment
Master_MTA Posted October 4, 2018 Share Posted October 4, 2018 On 04/10/2018 at 23:15, Jmaniacs said: will Expand u r welcome Link to comment
Jmaniacs Posted October 4, 2018 Author Share Posted October 4, 2018 On 04/10/2018 at 23:17, Master_MTA said: u r welcome Expand i already maked the code, but when i make the setPedAnalogControlState the ped stays flying in the air xd On 04/10/2018 at 23:44, Jmaniacs said: i already maked the code, but when i make the setPedAnalogControlState the ped stays flying in the air xd Expand wait, now it works, but only falls Link to comment
Master_MTA Posted October 4, 2018 Share Posted October 4, 2018 On 04/10/2018 at 23:44, Jmaniacs said: falls Expand am didn't understand u is it work or not +_+ 1 Link to comment
Jmaniacs Posted October 4, 2018 Author Share Posted October 4, 2018 On 04/10/2018 at 23:51, Master_MTA said: am didn't understand u is it work or not +_+ Expand dont works, the ped falls without using the parachute xd Link to comment
Master_MTA Posted October 4, 2018 Share Posted October 4, 2018 On 04/10/2018 at 23:52, Jmaniacs said: parachute Expand show me ur code Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 its so weight xdd, im not the best programmer Reveal hidden contents show = true showR = true showM = true showP = true showRP = true local name = getPlayerName(getLocalPlayer()) function editLogin() if show then Remember = guiCreateCheckBox(0.431, 0.505, 0.01, 0.02, "", true, true) Username = guiCreateEdit(0.46, 0.368, 0.1, 0.05, "Username", true) Password = guiCreateEdit(0.46, 0.45, 0.1, 0.05, "", true) setElementAlpha (Remember, 0.20) guiSetProperty(Username,"NormalTextColour","FF000000") guiEditSetMaxLength(Username, 25) guiSetProperty(Password,"NormalTextColour","FF000000") guiEditSetMaxLength(Password, 25) guiEditSetMasked ( Password, true ) local user, pw = loadLoginFromXML() if not( user == "" or pw == "") then guiCheckBoxSetSelected ( Remember, true ) guiSetText ( Username, tostring(user)) guiSetText ( Password, tostring(pw)) else guiCheckBoxSetSelected ( Remember, false ) guiSetText ( Username, tostring(user)) guiSetText ( Password, tostring(pw)) end end if not show then destroyElement(Username) destroyElement(Password) destroyElement(Remember) end end function editRegister() if showR then UsernameRegister = guiCreateEdit(0.46, 0.368, 0.1, 0.05, "Username", true) PasswordRegister = guiCreateEdit(0.46, 0.45, 0.1, 0.05, "Password", true) ConfirmPasswordRegister = guiCreateEdit(0.46, 0.53, 0.1, 0.05, "Password", true) guiEditSetMaxLength(PasswordRegister, 25) guiEditSetMasked ( PasswordRegister, true ) guiEditSetMaxLength(ConfirmPasswordRegister, 25) guiEditSetMasked ( ConfirmPasswordRegister, true ) end if not showR then destroyElement(UsernameRegister) destroyElement(PasswordRegister) destroyElement(ConfirmPasswordRegister) end end function editMenu() if showM then end if not showR then end end function isMouseInPosition ( x, y, width, height ) if ( not isCursorShowing( ) ) then return false end local sx, sy = guiGetScreenSize ( ) local cx, cy = getCursorPosition ( ) local cx, cy = ( cx * sx ), ( cy * sy ) if ( cx >= x and cx <= x + width ) and ( cy >= y and cy <= y + height ) then return true else return false end end local screenW, screenH = guiGetScreenSize() local sx,sy = screenW/1440,screenH/900 --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! LOGIN PAGE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! myFont = dxCreateFont( "images/Dosis.ttf", 20 ) function loginPage() show = true ---- fadeCamera(player, true) setCameraMatrix(-10.12109375, 1031.1455078125, 19.7421875, -20.4775390625, 1074.880859375, 37.591014862061) dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "images/LoginP.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! MENU PAGE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function menuPage () showM = true -- dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "images/Menu.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) -- dxDrawText("#07004c".."#%x%x%x%x%x%x", "") , screenW * 0.1938, screenH * 0.0100, screenW * 0.4764, screenH * 0.0556, tocolor(7, 0, 76, 255), 1.00, "bankgothic", "center", "center", false, false, false, true, false) -- dxDrawText("Years Old: '23'", screenW * 0.7604, screenH * 0.4111, screenW * 0.9236, screenH * 0.4489, tocolor(7, 0, 76, 255), 1.40, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("", screenW * 0.7604, screenH * 0.4733, screenW * 0.9236, screenH * 0.5111, tocolor(7, 0, 76, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("", screenW * 0.7604, screenH * 0.5356, screenW * 0.9236, screenH * 0.5733, tocolor(7, 0, 76, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PAGE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function page () showP = true -- dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "images/Pa.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! REGISTER PAGE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function registerPage() showR = true dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "images/bg.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "images/RegisterP.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function onClickBtnLogin(_,state) --При нажатии на кнопку Login if state == "up" then if isMouseInPosition(screenW * 0.4354, screenH * 0.5611, screenW * 0.1250, screenH * 0.0489) then --- LOGIN BUTTON showM = true username = guiGetText(Username) password = guiGetText(Password) if guiCheckBoxGetSelected ( Remember ) == true then checksave = true else checksave = false end triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password,checksave) end if isMouseInPosition(screenW * 0.4354, screenH * 0.6256, screenW * 0.1250, screenH * 0.0478) then show = false -- REGISTER BUUTTON removeEventHandler( "onClientRender",root, loginPage ) editLogin() removeEventHandler( "onClientClick", root, onClickBtnLogin ) editRegister() addEventHandler("onClientRender", root,registerPage) addEventHandler( "onClientClick", root, onClickBtnRegister ) end end end function onClickBtnSpawn(_,state) --При нажатии на кнопку Login if state == "up" then if isMouseInPosition(screenW * 0.0000, screenH * 0.0000, screenW * 0.1958, screenH * 0.1367) then --- SPAWN BUTTON showM = false triggerServerEvent("onRequestSpawn",getLocalPlayer()) end end end function onClickBtnLogout(_,state) --goes to the login and logout the account if state == "up" then if isMouseInPosition(screenW * 0.2076, screenH * 0.9300, screenW * 0.1062, screenH * 0.0700) then --- LOGOUT BUTTON showM = false showL = true editLogin() triggerServerEvent("onRequestLogout",getLocalPlayer()) end end end function onClickBtnRegister(_,state) --При нажатии на кнопку Register and Cofirm if state == "up" then --REGISTER if isMouseInPosition(screenW * 0.4361, screenH * 0.6000, screenW * 0.1243, screenH * 0.0500)then username = guiGetText(UsernameRegister) password = guiGetText(PasswordRegister) passwordConfirm = guiGetText(ConfirmPasswordRegister) triggerServerEvent("onRequestRegister",getLocalPlayer(),username,password,passwordConfirm) end --- BACK if isMouseInPosition(screenW * 0.4361, screenH * 0.6611, screenW * 0.1243, screenH * 0.0500) then showR = false editRegister() removeEventHandler("onClientRender", root,registerPage) removeEventHandler( "onClientClick", root, onClickBtnRegister ) show = true editLogin() addEventHandler("onClientRender", root,loginPage) addEventHandler( "onClientClick", root, onClickBtnLogin ) end end end --!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function loadLoginFromXML() --Загрузка логина и пароля из XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if usernameNode and passwordNode then return xmlNodeGetValue(usernameNode), xmlNodeGetValue(passwordNode) else return "", "" end xmlUnloadFile ( xml_save_log_File ) end function saveLoginToXML(username, password) --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end xmlNodeSetValue (usernameNode, tostring(username)) end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, tostring(password)) end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("saveLoginToXML", true) addEventHandler("saveLoginToXML", getRootElement(), saveLoginToXML) function resetSaveXML() --Сохрание логина и пароля в XML local xml_save_log_File = xmlLoadFile ("files/xml/userdata.xml") if not xml_save_log_File then xml_save_log_File = xmlCreateFile("files/xml/userdata.xml", "login") end if (username ~= "") then local usernameNode = xmlFindChild (xml_save_log_File, "username", 0) if not usernameNode then usernameNode = xmlCreateChild(xml_save_log_File, "username") end end if (password ~= "") then local passwordNode = xmlFindChild (xml_save_log_File, "password", 0) if not passwordNode then passwordNode = xmlCreateChild(xml_save_log_File, "password") end xmlNodeSetValue (passwordNode, "") end xmlSaveFile(xml_save_log_File) xmlUnloadFile (xml_save_log_File) end addEvent("resetSaveXML", true) addEventHandler("resetSaveXML", getRootElement(), resetSaveXML) function showLogin() setPlayerHudComponentVisible ("radar", false) exports["notices"]:addNotification("[ LOGIN ] Welcome to Surviving Zone",'info') editLogin() addEventHandler("onClientRender", root,loginPage) sound = playSound( "images/music.mp3" ) addEventHandler( "onClientClick", root, onClickBtnLogin ) local ped = createPed ( 0, -65.56640625, 1084.458984375, 100.761299133301 ) givePedWeapon(ped, 46, 1, true) setPedAnalogControlState( ped, "fire", 1 ) setPedAnalogControlState( ped, "jump", 1 ) guiSetInputEnabled(true) showChat(false) showCursor(true) end addEvent("showLoginWindow", true) addEventHandler("showLoginWindow", getRootElement(), showLogin) addEventHandler("onClientResourceStart",resourceRoot,showLogin) function showMenu() setPlayerHudComponentVisible ("radar", false) local pj = createPed ( 0, 88.67029, -42.73542, 0.86604, 220 ) local pj2 = createPed ( 7, 89.7029, -39.73542, 0.86604, 220 ) local veh = createVehicle ( 422, 88.67029, -37.73542, 0.86604, 0, 0, 130 ) setPedAnimation(pj, "Crack", "Bbalbat_Idle_01") setPedAnimation(pj2, "dancing", "dance_loop") addPedClothes ( pj, "moto", "moto", 16 ) addPedClothes ( pj, "player_torso", "torso", 0 ) addPedClothes ( pj, "player_legs", "legs", 2) setPedStat(pj, 23, 1000) setElementDimension ( pj, 666 ) setElementDimension ( pj2, 666 ) setElementDimension ( veh, 666 ) setElementDimension (source, 666) editMenu() addEventHandler("onClientRender", root,menuPage) addEventHandler( "onClientClick", root, onClickBtnSpawn ) addEventHandler( "onClientClick", root, onClickBtnLogout ) guiSetInputEnabled(true) showChat(false) showCursor(true) end addEvent("ShowMenuWindow", true) addEventHandler("ShowMenuWindow", getRootElement(), showMenu) function spawn() setPlayerHudComponentVisible ("radar", true) guiSetInputEnabled(false) showChat(true) showCursor(false) end addEvent("spawn", true) addEventHandler("spawn", getRootElement(), spawn) function hideMenuWindow() --Функция закрытия логин панели setPlayerHudComponentVisible ("radar", true) showM = false if (pj == 1) then destroyElement(pj) end guiSetInputEnabled(false) showCursor(false) showChat(true) removeEventHandler( "onClientRender",root, menuPage ) removeEventHandler( "onClientClick",root, onClickBtnSpawn ) removeEventHandler( "onClientClick",root, onClickBtnLogout ) end addEvent("hideMenuWindow", true) addEventHandler("hideMenuWindow", getRootElement(), hideMenuWindow) function showPage() if showP == false then showP = true addEventHandler("onClientRender", root,page) else showP = false RemoveEventHandler("onClientRender", root,page) end end bindKey ("F10", "down", showPage) function hideLoginWindow() --Функция закрытия логин панели setPlayerHudComponentVisible ("radar", false) show = false guiSetInputEnabled(false) showCursor(true) showChat(false) stopSound( sound) removeEventHandler( "onClientRender",root, loginPage ) editLogin() removeEventHandler( "onClientClick", root, onClickBtnLogin ) removeEventHandler( "onClientClick", root, onClickBtnRegister ) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) if you want can accept me in skype to communicate better Link to comment
Master_MTA Posted October 5, 2018 Share Posted October 5, 2018 On 05/10/2018 at 00:02, Jmaniacs said: skype Expand if u have discord that will be better any way i wasn't mean full code i just need small piece of it which spawn the ped and setting analoge stat any way change this setPedAnalogControlState( ped, "fire", 1 ) setPedAnalogControlState( ped, "jump", 1 ) to setPedAnalogControlState( ped, "jump", 1 ) setTimer( setPedAnalogControlState,1000*2,1, ped, "fire", 1 ) Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 (edited) ok it should works now, but i got a bug with the camera attachs Look at my signature Ok, fixed the camera bugs, but now your code of the timer dont works Ok, i got the camera bugs again. Edited October 5, 2018 by Jmaniacs Link to comment
Master_MTA Posted October 5, 2018 Share Posted October 5, 2018 On 05/10/2018 at 00:28, Jmaniacs said: works Expand setPedAnalogControlState( ped, "jump", 1 ) setTimer( setPedAnalogControlState,1000*0.5,1, ped, "fire", 1 ) Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 i dont know if it works correctly, because i have a freaking bug on the camera, its black add me on discord, please. Link to comment
Master_MTA Posted October 5, 2018 Share Posted October 5, 2018 On 05/10/2018 at 00:40, Jmaniacs said: discord Expand give me ur discord + use setCameraTarget & fadeCamera to fix camera stat Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 On 05/10/2018 at 01:45, Master_MTA said: give me ur discord + use setCameraTarget & fadeCamera to fix camera stat Expand i tried of all to fix the camera bro, and my discord is on my signature, Jmaniacs#9467 Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 On 05/10/2018 at 00:28, Jmaniacs said: works now Expand But not the peds activating the parachutes lol Link to comment
Discord Moderators Pirulax Posted October 5, 2018 Discord Moderators Share Posted October 5, 2018 There's a resource called 'parachute', try that. Link to comment
Jmaniacs Posted October 5, 2018 Author Share Posted October 5, 2018 On 05/10/2018 at 19:53, Pirulax said: There's a resource called 'parachute', try that. Expand the peds have parachute, but dont activate it Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now