yasin0 Posted August 15, 2017 Share Posted August 15, 2017 (edited) السلام عليكم ذا اول مود لي بالداتا وماعرفت له ابي اسوي ماركر اذا لمسه يعطيه فلوس واذا بيلمسه من جديد مايعطيه لانه اخذ مسبقا Test = createMarker(2038.05261,1530.66296,10.67188) function a (Player) gData = getElementData ( Player, 'gMarker', false) if gData == false then outputChatBox ('You already Data Gived') getElementData(Player,'gMarker',false) else if gData == true then setElementData(thePlayer,'gMarker',true) givePlayerMoney(Player,1000) end end end addEventHandler('onMarkerHit',Test,a) Edited August 15, 2017 by yasin0 Link to comment
yasin0 Posted August 15, 2017 Author Share Posted August 15, 2017 4 minutes ago, a7zan said: سطر 9 thePlayer = ? Test = createMarker(2038.05261,1530.66296,10.67188) function a (Player) gData = getElementData ( Player, 'gMarker', false) if gData == false then outputChatBox ('You already Data Gived') getElementData(Player,'gMarker',false) else if gData == true then setElementData(thePlayer,'gMarker',true) givePlayerMoney(Player,1000) end end end addEventHandler('onMarkerHit',Test,a) عدلته مع ذلك ماضبط Link to comment
a7zan Posted August 15, 2017 Share Posted August 15, 2017 (edited) Test = createMarker(2038.05261,1530.66296,10.67188) function a (Player) data = getElementData ( Player, 'gMarker') if data == true then outputChatBox ('You already Data Gived') elseif data == false then setElementData(Player,'gMarker',true) givePlayerMoney(Player,1000) end end addEventHandler('onMarkerHit',Test,a) Edited August 15, 2017 by a7zan Link to comment
yasin0 Posted August 15, 2017 Author Share Posted August 15, 2017 10 minutes ago, a7zan said: Test = createMarker(2038.05261,1530.66296,10.67188) function a (Player) data = getElementData ( Player, 'gMarker') if data == true then outputChatBox ('You already Data Gived') elseif data == false then setElementData(Player,'gMarker',true) givePlayerMoney(Player,1000) end end addEventHandler('onMarkerHit',Test,a) مشكور لكن اشرح لي اخطائي Link to comment
AHMED MOSTAFA Posted August 15, 2017 Share Posted August 15, 2017 --MoneyMarker = createMarker( x, y, z, "type", size, r, g, b, a ) MoneyMarker = createMarker( 2038, 1530.7 ,10.7 , "cylinder", 2, 0, 255, 0, 150 ) function onHit ( Player ) if source == MoneyMarker then if getElementData ( Player, "gMarker" ) or false == true then outputChatBox ( "You already Data Gived", Player, 255, 255, 0 ) elseif getElementData ( Player, "gMarker" ) or false == false then outputChatBox ( "Money Money Money Money .....", Player, 0, 255, 0 ) setElementData ( Player, "gMarker", true ) givePlayerMoney ( Player, 1000 ) end end end addEventHandler( 'onMarkerHit', root, onHit ) وين الماركر اللي انت مسويه ؟ Link to comment
a7zan Posted August 15, 2017 Share Posted August 15, 2017 انت مسوي اذا مامعه داتا يقوله ان الداتا معك اصلاً ، والداتا فولس فكيف معه ؟ ومسوي بالتحقق الثاني اذا الداتا ترو يعطيه فلوس باختصار انت عاكس بالتحققات لاغير . Link to comment
yasin0 Posted August 15, 2017 Author Share Posted August 15, 2017 1 minute ago, killerProject said: --MoneyMarker = createMarker( x, y, z, "type", size, r, g, b, a ) MoneyMarker = createMarker( 2038, 1530.7 ,10.7 , "cylinder", 2, 0, 255, 0, 150 ) function onHit ( Player ) if source == MoneyMarker then if getElementData ( Player, "gMarker" ) or false == true then outputChatBox ( "You already Data Gived", Player, 255, 255, 0 ) elseif getElementData ( Player, "gMarker" ) or false == false then outputChatBox ( "Money Money Money Money .....", Player, 0, 255, 0 ) setElementData ( Player, "gMarker", true ) givePlayerMoney ( Player, 1000 ) end end end addEventHandler( 'onMarkerHit', root, onHit ) وين الماركر اللي انت مسويه ؟ موجود اسمه Test Link to comment
AHMED MOSTAFA Posted August 15, 2017 Share Posted August 15, 2017 Just now, yasin0 said: موجود اسمه Test اها ادري لكن قصدت انك مب مكمل الارجمنتات لكن ما يخالف المهم حياك الله ما دامك استفدت من موضوعك createMarker( 2038, 1530.7 ,10.7 , "cylinder", 2, 0, 255, 0, 150 ) Link to comment
yasin0 Posted August 15, 2017 Author Share Posted August 15, 2017 1 minute ago, killerProject said: اها ادري لكن قصدت انك مب مكمل الارجمنتات لكن ما يخالف المهم حياك الله ما دامك استفدت من موضوعك createMarker( 2038, 1530.7 ,10.7 , "cylinder", 2, 0, 255, 0, 150 ) الله يحييك هذي الارقمنتات مو اجبارية فما حطيتها عشان اختصر الوقت واجرب الداتا وشكرا للجميع اهم شيء انا اتعلم لكن انا ابي مثال اني ازيد الداتا قيمة زيادة مثلا مثل مود النقاط كيف ازيد الداتا نقطة كل مافاز ؟ مثال Link to comment
AHMED MOSTAFA Posted August 15, 2017 Share Posted August 15, 2017 Just now, yasin0 said: الله يحييك هذي الارقمنتات مو اجبارية فما حطيتها عشان اختصر الوقت واجرب الداتا وشكرا للجميع اهم شيء انا اتعلم لكن انا ابي مثال اني ازيد الداتا قيمة زيادة مثلا مثل مود النقاط كيف ازيد الداتا نقطة كل مافاز ؟ مثال هذا " على سبيل المثال " كل ما تلمس الماركر يعطيك فلوس و يزيدك داتا Marker = createMarker( ........ ) function onHit ( Player ) if source == Marker then setElementData ( Player, "Level", getElementData ( Player, "Level" ) or 0 + 1 ) givePlayerMoney ( Player, 1000 ) end end addEventHandler( 'onMarkerHit', root, onHit ) Link to comment
yasin0 Posted August 15, 2017 Author Share Posted August 15, 2017 Just now, killerProject said: هذا " على سبيل المثال " كل ما تلمس الماركر يعطيك فلوس و يزيدك داتا Marker = createMarker( ........ ) function onHit ( Player ) if source == Marker then setElementData ( Player, "Level", getElementData ( Player, "Level" ) or 0 + 1 ) givePlayerMoney ( Player, 1000 ) end end addEventHandler( 'onMarkerHit', root, onHit ) مشكور يعطيك الف عافية 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