GAME_OVER!! Posted July 22, 2012 Share Posted July 22, 2012 بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاته مبروك لكل مسلم شهر رمضان الفاضل والكريم شباب اانا اريد شبه مود اريد صوره مثل الماركر يعني مثلا بحط في الدايري صوره في الوسط بدل الماركر وابيه لما واحد يمر على الصوره تختفي وياخذ فلوس وتطلع النافذه بعد دقيقتين انا بسوي كل شي انا ابي بس بدل الماركر صوره Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 شباب لاحد يبخل ردودكم نشاطكم لاهنتو Link to comment
JR10 Posted July 22, 2012 Share Posted July 22, 2012 ممكن لا يكون ما اردته local screenWidth, screenHeight = guiGetScreenSize() local posX, posY, posZ = 0, 0, 3 -- EDIT 0, 0, 0 TO CHANGE THE POSITION mrkCol = createColCircle(posX, posY, 1) function drawImage() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local scale = 1000 / screenWidth local width = 80 / scale dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", root, drawImage) function onImageHit() removeEventHandler("onClientRender", root, drawImage) destroyElement(source) end addEventHandler("onClientColShapeHit", mrkCol, onImageHit) غير local posX, posY, posZ = 0, 0, 3 علشان تغير مكان الصورة Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 مو شغاله لاكن سيرفر ولا كلاينت جربت الثنين انا local screenWidth, screenHeight = guiGetScreenSize() local posX, posY, posZ = 2497.88671875 ,-1672.7231445313 ,13.341871261597 mrkCol = createColCircle(posX, posY, 1) function drawImage() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local scale = 1000 / screenWidth local width = 80 / scale dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", root, drawImage) function onImageHit() removeEventHandler("onClientRender", root, drawImage) destroyElement(source) end addEventHandler("onClientColShapeHit", mrkCol, onImageHit) شوف الحل Link to comment
hassan.k.s.a Posted July 22, 2012 Share Posted July 22, 2012 مو شغاله لاكن سيرفر ولا كلاينت جربت الثنين انا local screenWidth, screenHeight = guiGetScreenSize() local posX, posY, posZ = 2497.88671875 ,-1672.7231445313 ,13.341871261597 mrkCol = createColCircle(posX, posY, 1) function drawImage() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local scale = 1000 / screenWidth local width = 80 / scale dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", root, drawImage) function onImageHit() removeEventHandler("onClientRender", root, drawImage) destroyElement(source) end addEventHandler("onClientColShapeHit", mrkCol, onImageHit) شوف الحل local screenWidth, screenHeight = guiGetScreenSize() local posX, posY, posZ = 2497.88671875, -1672.7231445313, 13.341871261597 --المسافه قبل الرقم مو بعده mrkCol = createColCircle(posX, posY, 1) function drawImage() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local scale = 1000 / screenWidth local width = 80 / scale dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", root, drawImage) function onImageHit() removeEventHandler("onClientRender", root, drawImage) destroyElement(source) end addEventHandler("onClientColShapeHit", mrkCol, onImageHit) Link to comment
hassan.k.s.a Posted July 22, 2012 Share Posted July 22, 2012 طيب لو رحت لصوره تصغير ليه ؟؟ ابي يكون لها حجم ثابت Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 انا مدري وش هدفك بس وضح أكثر يعني تبي اذا لمس شي يظهرله صوره وكذا ؟ ولا وش ؟ Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 لا يالحبيب انا ابي صوره في محل معين لو مر عليها واحد يعني لو خذها يحصل فلوس 20000 وتختفي نهائيا Link to comment
hassan.k.s.a Posted July 22, 2012 Share Posted July 22, 2012 يساعدونك الخبراء انا ماعندي خبره لذري الردجه Link to comment
top sniper Posted July 22, 2012 Share Posted July 22, 2012 لا يالحبيب انا ابي صوره في محل معين لو مر عليها واحد يعني لو خذها يحصل فلوس 20000وتختفي نهائيا https://wiki.multitheftauto.com/wiki/DxDrawImage Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 (edited) احسن حل لك انت انك تستخدم الماركر المخفي وتحط الصوره في مكان الماركر ولمن الاعب يلمس الماركر يخفي الصوره والماركر local Marker = createMarker( 2056.0012207031, 1535.5518798828, 9.671875, "cylinder ", 1, 0, 0, 0, 0 ) local image = dxDrawImage(323.0,206.0,638.0,295.0,"images/bullet.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) function hitIt(player) attachElements ( Marker, image , 0, 0, 3 ) destroyElement( Marker ) destroyElement( image ) givePlayerMoney( player, 20000 ) end addEventHandler("onMarkerHit", Marker, hitIt) هذا مثال بس ما جربته بالتوفيق Edited July 22, 2012 by Guest Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 local Marker = createMarker( 2497.88671875, -1672.7231445313, 13.341871261597, "cylinder ", 1, 0, 0, 0, 0 ) local image = dxDrawImage(323.0,206.0,638.0,295.0,"images/bullet.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) function hitIt() attachElements ( Marker, image , 0, 0, 3 ) destroyElement( Marker ) destroyElement( image ) end addEventHandler("onMarkerHit", Marker, hitIt) لا الماركر ولا الصوره مايطلعوون Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 (edited) أولاً المراكر انا مسويه مخفي بس مدري وش عن الصوره اي احد يشوفها ثانياً هذا مثال Edited July 22, 2012 by Guest Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 كلاينت اشتغل لاكن لما اسويله رستارت يطلع جنبي وبين ماروح يطلع جنبي ويختفي على طول سيرفر مايشتغل ابد Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 اكتب debugscript 3 في اف 8 او في الشات زي كذا /debugscript 3 وقلولي وش يطلع لك Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 Bad Argument addEventHandler Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 قللت لك هذا مثال لو تبي الصوره تطلع لازم تحطها بال meta.xml زي كذا <file src="bullet.png" /> عشان السكربت يفهمها حط اي صوره وسميها نفس الاسم bullet.png بعدين حط الصوره في ملف السكربت وغير الكود الي انا كاتبه بذا local image = dxDrawImage(323.0,206.0,638.0,295.0,"bullet.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 local Marker = createMarker( 2497.88671875, -1672.7231445313, 13.341871261597, "cylinder ", 1, 0, 0, 0, 0 ) local image = dxDrawImage(323.0,206.0,638.0,295.0,"business.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) function hitIt() attachElements ( Marker, image , 0, 0, 3 ) destroyElement( Marker ) destroyElement( image ) end addEventHandler("onMarkerHit", Marker, hitIt) يالحبيب عارف لاكن لو شغلت المود الصوره تكون جنب الاعب تطلع اقل من ثانيه وتطفي ولو سويت رستارت فنس الكلام Link to comment
TAPL Posted July 22, 2012 Share Posted July 22, 2012 dxDrawImage client side only onMarkerHit server side only onClientRender وعشان تخلي الصورة ما تختفي لازم تستخدم أفنت بيحط لك صوره ثابتة بالشاشة teteomar و على العموم ذا المثال الي عطاك أياه JR10 يفضل أنك تستخدم كود Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 ه دايماً اتلخبط بين الكلنت سايد والسيرفر سايد Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 local Marker = createMarker( 2497.88671875, -1672.7231445313, 13.341871261597, "cylinder ", 1, 0, 0, 0, 0 ) local image = dxDrawImage(323.0,206.0,638.0,295.0,"business.png",0.0,0.0,0.0,tocolor(255,255,255,255),false) addEventHandler("onClientMarkerHit", Marker, function(hitPlayer) attachElements ( Marker, image , 0, 0, 3 ) if ( hitPlayer == localPlayer ) then destroyElement( Marker ) destroyElement( image ) end) بس يب يفضل انك تستخدم كود JR10 Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 ياربي يعني كلكم ماتقدرون تسونها صوره بمحل محدد لمن يمر عليها واحد تختفي وياخذ فلوس بس تكفون آخر طلب لي هاذا JR10 تكفى يا TAPL وتكفى يا ويعناد تكفون آخر طلب ياريت تنفذونه Link to comment
JR10 Posted July 22, 2012 Share Posted July 22, 2012 أنا جربت كودى و يشتغل لى local screenWidth, screenHeight = guiGetScreenSize() local posX, posY, posZ = 0, 0, 3 -- EDIT 0, 0, 0 TO CHANGE THE POSITION mrkCol = createColCircle(posX, posY, 1) function drawImage() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local scale = 1000 / screenWidth local width = 80 / scale dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", root, drawImage) function onImageHit() removeEventHandler("onClientRender", root, drawImage) destroyElement(source) end addEventHandler("onClientColShapeHit", mrkCol, onImageHit) meta.xml لصورتك ولا تنسى تضيفها فى ال business.png غير Link to comment
GAME_OVER!! Posted July 22, 2012 Author Share Posted July 22, 2012 طيب حلو ابغى لو احد خذها ياخذ فلوس وخلاص ينتهي الموضوع Link to comment
3NAD Posted July 22, 2012 Share Posted July 22, 2012 (edited) ججرب ذآ local posX, posY, posZ = 1802, 850, 11.4 -- الإحداثيات local Marker = createMarker( posX, posY, posZ , "cylinder", 1.5, 0, 0, 0, 0) function draw() local screenWidth, screenHeight = guiGetScreenSize() local screenX, screenY = getScreenFromWorldPosition(posX, posY, posZ) local camX, camY, camZ = getCameraMatrix() local distance = getDistanceBetweenPoints2D(camX, camY, posX, posY) local scale = 1000 / screenWidth local width = 80 / scale if (screenX and distance < 50 and isLineOfSightClear(camX, camY, camZ, posX, posY, posZ)) then local image = dxDrawImage(screenX - width / 2, screenY - screenHeight / 10, width, 80, "business.png") end end addEventHandler("onClientRender", getRootElement(), draw) function hit(hitPlayer) local money = math.random(250,800) if ( hitPlayer == localPlayer ) then removeEventHandler("onClientRender", getRootElement(), draw) destroyElement( Marker ) givePlayerMoney ( money ) outputChatBox("* you got $".. money .." for Destroying the picture",0,255,0,true) end end addEventHandler("onClientMarkerHit", Marker,hit) Edited July 22, 2012 by Guest 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