Ahmed toap Posted June 16, 2017 Share Posted June 16, 2017 السلام عليكم اسف طلباتي كثيرة بس والله محتاج غصب عني ده مود اطلاق الصوريخ من السيارة ابي احوله بسريلات عشان مش اي احد يطلق function shoot1() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle) and not isCursorShowing() then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) addEventHandler("onClientPreRender",root,pb) setTimer ( function() unbindKey("mouse1", "down", shoot1 ) setTimer(addBind1, 2900, 1) end, 50, 1 ) end end function shoot2() local vehicle = getPedOccupiedVehicle(localPlayer) if(vehicle) and not isCursorShowing() then local x, y, z = getElementPosition(vehicle) createProjectile(vehicle, 19, x, y, z) addEventHandler("onClientPreRender",root,pb2) setTimer ( function() unbindKey("mouse2", "down", shoot2 ) setTimer(addBind2, 2900, 1) end, 50, 1 ) end end function addBind1() bindKey("mouse1", "down", shoot1) end function addBind2() bindKey("mouse2", "down", shoot2) end addCommandHandler("d", d) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addBind1) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), addBind2) --loading hud --hud function hud() label2 = guiCreateLabel(0.895,0.787,0.94,0.92,"ROCKET 1",true) local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 180, 50 local left = screenWidth/1.09 - windowWidth/2 local top = screenHeight/1.2 - windowHeight/2 prog = guiCreateProgressBar(left, top, windowWidth, windowHeight, false) guiProgressBarSetProgress(prog,0) tick = getTickCount() end addEventHandler("onClientVehicleEnter",root,hud) addEventHandler("onClientResourceStart",root,hud) function pb() local done = getTickCount() if(guiProgressBarGetProgress(prog)==100)then local endT = getTickCount() removeEventHandler("onClientPreRender",root,pb) destroyElement(prog) setTimer(hud, 50, 1) else guiProgressBarSetProgress(prog,guiProgressBarGetProgress(prog)+1) if((done-tick)/1000 == 10)then slow() end end end function slow() removeEventHandler("onClientPreRender",root,pb) end --hud2 function hud2() label1 = guiCreateLabel(0.895,0.69,0.94,0.92,"ROCKET 2",true) local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 180, 50 local left = screenWidth/1.09 - windowWidth/2 local top = screenHeight/1.35 - windowHeight/2 prog2 = guiCreateProgressBar(left, top, windowWidth, windowHeight, false) guiProgressBarSetProgress(prog2,0) tick = getTickCount() end addEventHandler("onClientVehicleEnter",root,hud2) addEventHandler("onClientResourceStart",root,hud2) function pb2() local done = getTickCount() if(guiProgressBarGetProgress(prog2)==100)then local endT = getTickCount() removeEventHandler("onClientPreRender",root,pb2) destroyElement(prog2) setTimer(hud2, 50, 1) else guiProgressBarSetProgress(prog2,guiProgressBarGetProgress(prog2)+1) if((done-tick)/2000 == 20)then slow() end end end --die,exit function hide() destroyElement(prog) destroyElement(prog2) destroyElement(label1) destroyElement(label2) end addEventHandler("onClientPlayerWasted",root,hide) addEventHandler("OnClientPlayerVehicleExit",root,hide) --JUMP function bind() bindKey("lshift", "down", jump) end addEventHandler("onClientResourceStart", root, bind) player = localPlayer function jump() if isPedInVehicle(player) then local veh = getPedOccupiedVehicle(player) if isPedOnGround(player) then local vx,vy,vz = getElementVelocity(veh) setElementVelocity(veh,vx,vy,vz + 0.27) setTimer ( function() unbindKey("lshift", "down", jump ) setTimer(bind, 2400, 1) end, 1000, 1 ) end end end outputChatBox("Script by Xwad") Link to comment
Adham Posted June 16, 2017 Share Posted June 16, 2017 واحنا كيف نعرف الخطأ من كل السطور هكذا ؟ Link to comment
coNolel Posted June 16, 2017 Share Posted June 16, 2017 السكربت اصلا كلينت سايد اذن لازمك ترايقر للسيرفر سايد عشان تجيب سريال اللاعب واذا سريال اللاعب من السريالات اللي حاطها في جدول تكون مسويه انت تسوي ترايقر ل كلينت سايد وتطلق عادي Link to comment
Ahmed toap Posted June 16, 2017 Author Share Posted June 16, 2017 (edited) 1 hour ago, coNolel said: السكربت اصلا كلينت سايد اذن لازمك ترايقر للسيرفر سايد عشان تجيب سريال اللاعب واذا سريال اللاعب من السريالات اللي حاطها في جدول تكون مسويه انت تسوي ترايقر ل كلينت سايد وتطلق عادي والله لو اعرف في الكلام ده ما كان طلبت بليز سويه و اكون ممتن الك اخي 2 hours ago, Deativated said: واحنا كيف نعرف الخطأ من كل السطور هكذا ؟ لا يا غالي ما في خطئ انا ابي احول المود بيشتغل بسريلات بس Edited June 16, 2017 by Ahmed toap Link to comment
Rockyz Posted June 16, 2017 Share Posted June 16, 2017 (edited) triggerServerEvent getPlayerSerial triggerClientEvent Edited June 16, 2017 by #,+( _xiRoc[K]; > 1 Link to comment
^iiEcoo'x_) Posted June 16, 2017 Share Posted June 16, 2017 18 minutes ago, #,+( _xiRoc[K]; > said: triggerServerEvent getPlayerSerial triggerClientEvent ذذ , في طريقة اسهل 'onPlayerJoin' getPlayerSerial setElementData -- getElementData Link to comment
Ahmed toap Posted June 16, 2017 Author Share Posted June 16, 2017 اسف بس ممكن جاهز عشان ما اعرف في البرمجة والله Link to comment
Guest Posted November 28, 2017 Share Posted November 28, 2017 حاول اذا ما نفعت اطرح اكوادك .. ، هيه متقدر يعطيك كود جاهز ~ 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