abdalbaset Posted April 18, 2014 Share Posted April 18, 2014 شباب بدي مساعدة بدي الكود التالي س اللاعب يلمس الماركير الثاني ياخذ فلوس حدي يشوف وين خطائي LS=createMarker ( 1949.4000244141,-2493.8999023438,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) function pil() LS2=createMarker (1811.5999755859,-2493.8000488281,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) end addEventHandler( "onMarkerHit", LS, pil ) function money() if isElementWithinMarker(theplayer,money) then givePlayerMoney (theplayer , 5000 ) outputChatBox(" you got 5000$,", thePlayer, 255, 0, 0) end end addEventHandler( "onMarkerHit", LS2, money ) هذا الي يظهر في الديبوق >[00:22:12] WARNING: pilot-in-deve\pilots.lua:23: Bad argument @ 'addEventHan ' [Expected element at argument 2, got nil] Link to comment
Mr-M3AND Posted April 18, 2014 Share Posted April 18, 2014 شباب بدي مساعدة بدي الكود التالي س اللاعب يلمس الماركير الثاني ياخذ فلوس حدي يشوف وين خطائي LS=createMarker ( 1949.4000244141,-2493.8999023438,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) function pil() LS2=createMarker (1811.5999755859,-2493.8000488281,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) end addEventHandler( "onMarkerHit", LS, pil ) function money() if isElementWithinMarker(theplayer,money) then givePlayerMoney (theplayer , 5000 ) outputChatBox(" you got 5000$,", thePlayer, 255, 0, 0) end end addEventHandler( "onMarkerHit", LS2, money ) هذا الي يظهر في الديبوق >[00:22:12] WARNING: pilot-in-deve\pilots.lua:23: Bad argument @ 'addEventHan ' [Expected element at argument 2, got nil] LS2 = createMarker (1811.5999755859,-2493.8000488281,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) function money(thePlayer) if getElementType(thePlayer) == 'player' then givePlayerMoney (thePlayer , 5000 ) outputChatBox(" you got 5000$,", thePlayer, 255, 0, 0) end end addEventHandler( "onMarkerHit", LS2, money ) Link to comment
</Mr.Tn6eL> Posted April 20, 2014 Share Posted April 20, 2014 اذ تبي الماركر الثاني يروح مكان ثاني استخدم setElementPosition Link to comment
™!>VàLéNTiNô<!™ Posted April 21, 2014 Share Posted April 21, 2014 عند لمس الماركر التانى ياخد اللاعب اللى لمسو فلوس LS2 = createMarker (1811.5999755859,-2493.8000488281,13.199999809265, "cylinder", 1.5, 255, 255, 0, 170 ) ------- نقوم بعمل ماركر addEventHandler("onMarkerHit", LS2, ------ عند لمس الماركر function (thePlayer) --- وظيفة if getElementType ( thePlayer ) == "player" and not isPedInVehicle ( thePlayer ) then -------- نتحقق من ان لاعب قام بلمس الماركر وانه ليس داخل سيارة givePlayerMoney ( thePlayer, 5000) ------ نعطى اللاعب مبلغ من المال outputChatBox("#00ff00you got#ff0000 5000$ #ffff00Dolars", thePlayer, 255, 255, 255, true) ----- مخرج كلام فى الشات بانه اخد مال end ----- نهاية الوظيفة 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