Sijar Posted July 18, 2018 Share Posted July 18, 2018 سلام عليكم انا مرتب الاكواد جيد و حاطط صح 100% بدي حل للمشكلة الماركر مش بيظهر حتي لو حطيط احدثيات server.lua addEvent( 'giveMoney;checkPlayer', true ) addEventHandler( 'giveMoney;checkPlayer', root, function( ) local data = getElementData( source, 'i:~Below;?' ) if ( data == 'true' ) then outputChatBox( '' خطاء : لقد اخذت المال من قبل '', source, 255, 0, 0, true ) return end givePlayerMoney( source, 500000 ) setElementData( source, 'i:~Below;?', 'true' ) end ) client.lua local x, y, z = getElementPosition( localPlayer ) local Marker = createMarker( x + 2, y, z - 1, 'cylinder', 1.5, 255, 255, 255, 255 ) setElementData( localPlayer, 'i:~Below;?', nil ) addEventHandler( 'onclientMarkerHit', Marker, function( hitElement ) if ( hitElement == localPlayer ) then triggerServerEvent( giveMoney;checkPlayer', localPlayer ) end end, false ) حد يطلع مشكلة عدم ظهور الماركر هتقولي احدثيات انا مركب احدثيات صح Link to comment
MrBiG Posted July 18, 2018 Share Posted July 18, 2018 5 minutes ago, Mr.BLack said: سلام عليكم انا مرتب الاكواد جيد و حاطط صح 100% بدي حل للمشكلة الماركر مش بيظهر حتي لو حطيط احدثيات server.lua addEvent( 'giveMoney;checkPlayer', true ) addEventHandler( 'giveMoney;checkPlayer', root, function( ) local data = getElementData( source, 'i:~Below;?' ) if ( data == 'true' ) then outputChatBox( '' خطاء : لقد اخذت المال من قبل '', source, 255, 0, 0, true ) return end givePlayerMoney( source, 500000 ) setElementData( source, 'i:~Below;?', 'true' ) end ) client.lua local x, y, z = getElementPosition( localPlayer ) local Marker = createMarker( x + 2, y, z - 1, 'cylinder', 1.5, 255, 255, 255, 255 ) setElementData( localPlayer, 'i:~Below;?', nil ) addEventHandler( 'onclientMarkerHit', Marker, function( hitElement ) if ( hitElement == localPlayer ) then triggerServerEvent( giveMoney;checkPlayer', localPlayer ) end end, false ) حد يطلع مشكلة عدم ظهور الماركر هتقولي احدثيات انا مركب احدثيات صح أنت معرف الاحداثيات الي يوخذها الماركر بالوكل بلاير ولكان الماركر متغير اصلي بالمود الاحداثيات رح توخذ لكل مستخدم فلهذا هنا نشاء خطأ لازم تحط احداثيات رقمية وعندك أخطأ كثيره صراحة --# Client Said local x , y , z = 100 , 1800 , 15 local Marker = createMarker( x + 2, y, z - 1, 'cylinder', 1.5, 255, 255, 255, 255 ) setElementData( localPlayer , "Below" , nil ) addEventHandler( 'onClientMarkerHit', Marker, function( hitElement ) if ( hitElement == localPlayer ) then triggerServerEvent ( "givePlayerMoneyTrigger", localPlayer ) end end ) --# Server Said addEvent ( "givePlayerMoneyTrigger" , true ) addEventHandler ( "givePlayerMoneyTrigger" , root , function ( ) if ( getElementData( source , "Below" ) ) then outputChatBox( ' خطاء : لقد اخذت المال من قبل ', source, 255, 0, 0, true ) return false end outputChatBox ( 'لقد حصلت على 500,000 $ من النقود', source, 0, 255, 0, true ) givePlayerMoney ( source , 500000 ) setElementData ( source , "Below" , true ) 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