Ja[B]er[X]Pro Posted June 23, 2016 Share Posted June 23, 2016 (edited) السلام عليكم ورحمة الله وبركاته سويت ماركر ابي لما الشخص يلمسه ان كان يحمل السلاح ما ان كان يملكه يأخد فلوس الطلب هو كيف اسوي تحقق ان كان يحمل السلاح __________________________________ تم الافادة في الطلب الاول انزل للأسفل وشوف طلب الثاني Edited June 24, 2016 by Guest Link to comment
Ja[B]er[X]Pro Posted June 23, 2016 Author Share Posted June 23, 2016 ما صار شيئ ادخل الماركر واضغط N يشتغل وانا ما اكون حامل السلاح الاكواد addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle(hitting) then if getPedWeapon(hitting,9) then bindKey("N","down",startJob2) end end end end ) Link to comment
Me[Z]oO Posted June 23, 2016 Share Posted June 23, 2016 addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark and hitting == localPlayer then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle(hitting) then if getPedWeapon(hitting) == id then bindKey("N","down",startJob2) end end end end ) جرب مو متاكد من الكود بدل id ب اي دي السلاح Link to comment
Abdul KariM Posted June 23, 2016 Share Posted June 23, 2016 addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark and hitting == localPlayer then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle ( hitting ) then if getPedWeapon( hitting ) and getPedWeaponSlot ( hitting ) == 9 then bindKey("N","down",startJob2) end end end end ) Link to comment
Ja[B]er[X]Pro Posted June 23, 2016 Author Share Posted June 23, 2016 addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark and hitting == localPlayer then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle ( hitting ) then if getPedWeapon( hitting ) and getPedWeaponSlot ( hitting ) == 9 then bindKey("N","down",startJob2) end end end end ) صرت يوم ادخل الماركر حتى لو كنت حامل السلاح وضغط حرف N ما يصير شيئ Link to comment
Abdul KariM Posted June 23, 2016 Share Posted June 23, 2016 وريني ذي الوظيفة startJob2 Link to comment
Mr.R Posted June 24, 2016 Share Posted June 24, 2016 والله مدري ولاكن جرب كذا , حسب الي فهمته من الويكي انه يقول تحقق من رصاص السلاح addEventHandler ( "onClientMarkerHit", root, function ( hitting ) if ( source == woodMark ) and ( hitting == localPlayer ) then if ( getElementData ( hitting, "Occupation" ) == "Wood-Jop" ) and not ( isPedInVehicle ( hitting ) )then if ( getPedTotalAmmo ( hitting ) == nil ) then return end if ( getPedWeapon ( hitting ) and ( getPedWeaponSlot ( hitting ) ) == 9 ) then bindKey ( "N","down", startJob2 ) end end end end ) Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 وريني ذي الوظيفة startJob2 function startJob2() if ( guiGetVisible ( window213 ) == true) then return end setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window213,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window213, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#woodMarkers) local x = woodMarkers [num][1] local y = woodMarkers [num][2] local z = woodMarkers [num][3] setElementPosition(woodMark,x,y,z) setElementPosition(woodMarkk,x,y,z+2.0) setElementPosition(woodBlip,x,y,z) setElementPosition(woodobj,x,y,z) Reward = math.random(70,110) setElementData(localPlayer, "wood", (getElementData (localPlayer,"wood") or 0) + Reward) addEventHandler("onClientRender",root,givedx) setTimer(function() removeEventHandler("onClientRender",root,givedx) end,3000,1) end, 10000,1) end Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 والله مدريولاكن جرب كذا , حسب الي فهمته من الويكي انه يقول تحقق من رصاص السلاح addEventHandler ( "onClientMarkerHit", root, function ( hitting ) if ( source == woodMark ) and ( hitting == localPlayer ) then if ( getElementData ( hitting, "Occupation" ) == "Wood-Jop" ) and not ( isPedInVehicle ( hitting ) )then if ( getPedTotalAmmo ( hitting ) == nil ) then return end if ( getPedWeapon ( hitting ) and ( getPedWeaponSlot ( hitting ) ) == 9 ) then bindKey ( "N","down", startJob2 ) end end end end ) ما اشتغل Link to comment
Me[Z]oO Posted June 24, 2016 Share Posted June 24, 2016 addEventHandler ( "onClientMarkerHit", root, function ( hitting ) if ( source == woodMark ) and ( hitting == localPlayer ) then if ( getElementData ( hitting, "Occupation" ) == "Wood-Jop" ) and not ( isPedInVehicle ( hitting ) )then if ( getPedWeapon ( hitting ) == 9 ) then bindKey ( "n","down", startJob2 ) end end end end ) جرب كذا ^ Link to comment
Abdul KariM Posted June 24, 2016 Share Posted June 24, 2016 ^ مايفرق ان كانت كبتل او سمول local JobState = false addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark and hitting == localPlayer then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle ( hitting ) then if getPedWeapon( hitting ) and getPedWeaponSlot ( hitting ) == 9 then JobState = true end end end end ) function startJob2() if not ( JobState == true ) then return end if ( guiGetVisible ( window213 ) == true) then return end setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window213,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window213, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#woodMarkers) local x = woodMarkers [num][1] local y = woodMarkers [num][2] local z = woodMarkers [num][3] setElementPosition(woodMark,x,y,z) setElementPosition(woodMarkk,x,y,z+2.0) setElementPosition(woodBlip,x,y,z) setElementPosition(woodobj,x,y,z) Reward = math.random(70,110) setElementData(localPlayer, "wood", (getElementData (localPlayer,"wood") or 0) + Reward) addEventHandler("onClientRender",root,givedx) setTimer(function() removeEventHandler("onClientRender",root,givedx) end,3000,1) end, 10000,1) end bindKey("N","down",startJob2) Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 ^مايفرق ان كانت كبتل او سمول local JobState = false addEventHandler("onClientMarkerHit",root, function (hitting) if source == woodMark and hitting == localPlayer then if ( getElementData( hitting, 'Occupation' ) == "Wood-Jop" ) and not isPedInVehicle ( hitting ) then if getPedWeapon( hitting ) and getPedWeaponSlot ( hitting ) == 9 then JobState = true end end end end ) function startJob2() if not ( JobState == true ) then return end if ( guiGetVisible ( window213 ) == true) then return end setElementFrozen(localPlayer,true) setPedAnimation(localPlayer,"BSKTBALL","BBALL_react_miss") setTimer(setPedAnimation,10000,1,localPlayer) setTimer(setElementFrozen,10000,1,localPlayer,false) showCursor(true) guiSetVisible(window213,true) local lol = guiProgressBarGetProgress(progressbar) setTimer( guiProgressBarSetProgress, 1000, 1,progressbar,lol+10 ) setTimer( guiSetText, 1000, 1,label,"10%") setTimer( guiProgressBarSetProgress, 2000, 1,progressbar,lol+20 ) setTimer( guiSetText, 2000, 1,label,"20%") setTimer( guiProgressBarSetProgress, 3000, 1,progressbar,lol+30 ) setTimer( guiSetText, 3000, 1,label,"30%") setTimer( guiProgressBarSetProgress, 4000, 1,progressbar,lol+40 ) setTimer( guiSetText, 4000, 1,label,"40%") setTimer( guiProgressBarSetProgress, 5000, 1,progressbar,lol+50 ) setTimer( guiSetText, 5000, 1,label,"50%") setTimer( guiProgressBarSetProgress, 6000, 1,progressbar,lol+60 ) setTimer( guiSetText, 6000, 1,label,"60%") setTimer( guiProgressBarSetProgress, 7000, 1,progressbar,lol+70 ) setTimer( guiSetText, 7000, 1,label,"70%") setTimer( guiProgressBarSetProgress, 8000, 1,progressbar,lol+80 ) setTimer( guiSetText, 8000, 1,label,"80%") setTimer( guiProgressBarSetProgress, 9000, 1,progressbar,lol+90 ) setTimer( guiSetText, 9000, 1,label,"90%") setTimer( guiProgressBarSetProgress, 10000, 1,progressbar,lol+100 ) setTimer( guiSetText, 10000, 1,label,"100%") timer = setTimer(function () guiSetVisible(window213, false) showCursor(false) guiProgressBarSetProgress(progressbar, 0) unbindKey("tab","down",startN9) local num = math.random (#woodMarkers) local x = woodMarkers [num][1] local y = woodMarkers [num][2] local z = woodMarkers [num][3] setElementPosition(woodMark,x,y,z) setElementPosition(woodMarkk,x,y,z+2.0) setElementPosition(woodBlip,x,y,z) setElementPosition(woodobj,x,y,z) Reward = math.random(70,110) setElementData(localPlayer, "wood", (getElementData (localPlayer,"wood") or 0) + Reward) addEventHandler("onClientRender",root,givedx) setTimer(function() removeEventHandler("onClientRender",root,givedx) end,3000,1) end, 10000,1) end bindKey("N","down",startJob2) ما تغيير شيئ Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 addEventHandler ( "onClientMarkerHit", root, function ( hitting ) if ( source == woodMark ) and ( hitting == localPlayer ) then if ( getElementData ( hitting, "Occupation" ) == "Wood-Jop" ) and not ( isPedInVehicle ( hitting ) )then if ( getPedWeapon ( hitting ) == 9 ) then bindKey ( "n","down", startJob2 ) end end end end ) جرب كذا ^ شكرأً لك ميزو اشتغل وشكراً لكل شخص ساعدني Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 معي لوحة سيارات ابي اسوي من مود اخر اقدر اضيف سيارة لمود اللوحة كيف؟ كود اضافة سيارة للجريد ليست بلوحة السيارات عن الشراء من متجر المود نفسه addEvent("onBuyNewVehicle", true) addEventHandler("onBuyNewVehicle", root, function(Model, cost, r1, g1, b1, r2, g2, b2) abc = false local data = dbPoll(dbQuery(db, "SELECT * FROM VehicleList WHERE Account = ?", getAccountName(getPlayerAccount(source))), -1) for i, data in ipairs (data) do if data["Model"] == Model then abc = true break end end if #data >= 5 then exports["guimessages"]:outputServer(source,"[Vehicle System] #FF0000Sorry, but Max vehicles is 5 only.", 255, 85, 0, true) return end if abc then exports["guimessages"]:outputServer(source,"[Vehicle System] #FF0000You already bought this vehicle before.", 255, 85, 0, true) return end if (getElementData(source, "Money") or 0) >= tonumber(cost) then setElementData(source, "Money", getElementData(source, "Money") - cost) local x, y, z = getElementPosition(source) local _, _, rz = getElementRotation(source) local color = r1..","..g1..","..b1..","..r2..","..g2..","..b2 vehicle = createVehicle(Model, x-5, y+5, z, 0, 0, rz) setVehicleColor(vehicle, r1, g1, b1, r2, g2, b2) setElementData(vehicle, "Owner", source) local NewID = getFreeID() setElementData(vehicle, "ID", NewID) dbExec(db, "INSERT INTO VehicleList VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", NewID, getAccountName(getPlayerAccount(source)), Model, x-5, y+5, z, rz, color, "", 3, cost, 1000) exports["guimessages"]:outputServer(source,"[Vehicle System] #FFFF00You Bought: #00FFFF"..getVehicleNameFromModel(Model), 255, 85, 0, true) exports["guimessages"]:outputServer(source,"[Vehicle System] #FFFF00Cost: #00FF00$"..cost, 255, 85, 0, true) updateVehicleInfo(source) vv[vehicle] = setTimer(function(source) if not isElement(source) then killTimer(vv[source]) vv[source] = nil end if isElement(source) and getElementHealth(source) <= 255 then setElementHealth(source, 255.5) setVehicleDamageProof(source, true) setVehicleEngineState(source, false) end end, 50, 0, vehicle) addEventHandler("onVehicleDamage", vehicle, function(loss) local account = getAccountName(getPlayerAccount(getElementData(source, "Owner"))) setTimer(function(source) if isElement(source) then dbExec(db, "UPDATE VehicleList SET HP = ? WHERE Account = ? AND Model = ?", getElementHealth(source), account, getElementModel(source)) updateVehicleInfo(getElementData(source, "Owner")) end end, 100, 1, source) end) addEventHandler("onVehicleEnter", vehicle, function(player) if getElementHealth(source) <= 255.5 then setVehicleEngineState(source, false) else if isVehicleDamageProof(source) then setVehicleDamageProof(source, false) end end end) else exports["guimessages"]:outputServer(source,"[Vehicle System] #FF0000You don't have enough money.", 255, 85, 0, true) end end) ++++++++++ وش الخطأ هنا اكتب الكلمة ما يصير شيئ addCommandHandler("swood",function(amount) if type(amount) == "number" then if getElementData(localPlayer,"wood") >= amount then local money = tonumber(amount)*35 setElementData(localPlayer,"Money",getElementData(localPlayer,"Money") + money) setElementData(localPlayer,"wood",getElementData(localPlayer,"wood") - amount) outputChatBox("تم البيع بنجاح",0,255,0) else outputChatBox("انت لا تملك عدد كافي من الخشب",255,0,0) end end end والدي بق ما يجيب شيئ Link to comment
#Soking Posted June 24, 2016 Share Posted June 24, 2016 كيف الدي بوق مايقول شي في الكود الثاني وهو في قوص ناقص ؟ Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 كيف الدي بوق مايقول شي في الكود الثاني وهو في قوص ناقص ؟ القوس موجود لكن وانا اسوي الرد مسحته بالخطأ من هنا فقط Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 تم حل مشكلة اضافة سيارات من قبل DTC12 Link to comment
Ja[B]er[X]Pro Posted June 24, 2016 Author Share Posted June 24, 2016 يوم اضغط اف5 ما تفتح اللوحة يجني خطأ في سطر 308 وهو السطر رقم 3 بين الاكواد دي bindKey("F5","down",function() local xple = getElementData(localPlayer,"xple") if xple >= 50 and xple < 150 then guiSetText(GUIEditor.label[15],"Current Rank : Level 1") guiSetText(GUIEditor.label[35],"Next Rank : Level 2") guiSetVisible(GUIEditor.label[45],"Points Required : 150") elseif xple >= 150 and xple < 400 then guiSetText(GUIEditor.label[15],"Current Rank : Level 2") guiSetText(GUIEditor.label[35],"Next Rank : Level 3") guiSetVisible(GUIEditor.label[45],"Points Required : 400") elseif xple >= 400 and xple < 750 then guiSetText(GUIEditor.label[15],"Current Rank : Level 3") guiSetText(GUIEditor.label[35],"Next Rank : Level 4") guiSetVisible(GUIEditor.label[45],"Points Required : 750") elseif xple >= 750 and xple < 12000 then guiSetText(GUIEditor.label[15],"Current Rank : Level 4") guiSetText(GUIEditor.label[35],"Next Rank : Level 5") guiSetVisible(GUIEditor.label[45],"Points Required : 1200") elseif xple >= 1200 and xple < 1800 then guiSetText(GUIEditor.label[1],"Current Rank : Level 5") guiSetText(GUIEditor.label[35],"Next Rank : Level 6") guiSetVisible(GUIEditor.label[45],"Points Required : 1800") elseif xple >= 1800 and xple < 2250 then guiSetText(GUIEditor.label[15],"Current Rank : Level 6") guiSetText(GUIEditor.label[35],"Next Rank : Level 7") guiSetVisible(GUIEditor.label[45],"Points Required : 2250") elseif xple >= 2250 and xple < 2800 then guiSetText(GUIEditor.label[15],"Current Rank : Level 7") guiSetText(GUIEditor.label[35],"Next Rank : Level 8") guiSetVisible(GUIEditor.label[45],"Points Required : 2800") elseif xple >= 2800 and xple < 3350 then guiSetText(GUIEditor.label[15],"Current Rank : Level 8") guiSetText(GUIEditor.label[35],"Next Rank : Level 9") guiSetVisible(GUIEditor.label[45],"Points Required : 3350") elseif xple >= 3350 and xple < 4000 then guiSetText(GUIEditor.label[15],"Current Rank : Level 9") guiSetText(GUIEditor.label[35],"Next Rank : Level 10") guiSetVisible(GUIEditor.label[45],"Points Required : 4000") elseif xple >= 4000 then guiSetText(GUIEditor.label[15],"Current Rank : Level 10") guiSetText(GUIEditor.label[35],"Next Rank : Maximum") guiSetVisible(GUIEditor.label[45],"Points Required : Maxium") elseif xple < 40 then guiSetText(GUIEditor.label[15],"Current Rank : No") guiSetText(GUIEditor.label[35],"Next Rank : Level 1") guiSetVisible(GUIEditor.label[45],"Points Required : 40") end guiSetText(GUIEditor.label[25],"Current Points : "..xple) guiSetVisible(GUIEditor.window[112],not guiGetVisible(GUIEditor.window[112])) showCursor( guiGetVisible(GUIEditor.window[112]) ) end) 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