αвυ-wαleed Posted February 15, 2014 Share Posted February 15, 2014 الحين ضغط h من برى الماركر يسوي الحركة ويشتري ابغى حاجة ما يشتري الا اذا اللاعب جوا الماركر يعني ابغى يتأكد من دخول اللاعب الماركر قبل القيام بالوظيفة local marker1 = createMarker ( 2759.8745117188,-2015.3276367188,12.9000000, "cylinder", 0.70, 252, 0, 252 ); local marker2 = createMarker ( 2127.2795410156,-1778.0109863281,13.357691574097, "cylinder", 0.70, 252, 0, 252 ); local bind = { } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for _, p in ipairs( getElementsByType ( "player" ) ) do bindKey ( p, "h", "down", Animation ); end end ); addEventHandler ( "onPlayerJoin", root, function ( ) bindKey ( source, "h", "down", Animation ); end ); function Animation ( plr ) if isElementWithinMarker(plr, marker1)==isElementWithinMarker(plr, marker2) then local PlayerMoney = getPlayerMoney ( plr ); if ( PlayerMoney >= 150 ) then takePlayerMoney ( plr, 150 ); setElementFrozen ( plr, true ) setTimer (setElementFrozen, 5500, 1, plr, false) setPedArmor ( plr, 100 ); setPedAnimation ( plr, "FOOD", "EAT_Burger", _, false, _, _, false ); exports['topbarchat']:sendClientMessage ( " لقد قمت بشراء العصير ", plr, 0, 255, 255, true ) exports['topbarchat']:sendClientMessage ( "150$ ", plr, 0, 255, 255, true ) else exports['topbarchat']:sendClientMessage ( "* لا يوجد لديك المال الكافي لشراء العصير ", plr, 0, 252, 255, true ) exports['topbarchat']:sendClientMessage ( "150$ ", plr, 0, 252, 255, true ) end bind[ plr ] = true end end addEventHandler ( 'onMarkerLeave', root, function ( player ) if source == marker1 or source == marker2 then if ( getElementType ( player ) == "player" ) then exports['topbarchat']:sendClientMessage ( " H أذا أردت شراء العصير اضغط ", player, 255, 0, 255, true ) exports['topbarchat']:sendClientMessage ( " 150$ بمبلغ ", player, 255, 0, 255, true ) end end end Link to comment
فاّرس Posted February 15, 2014 Share Posted February 15, 2014 رتب اكوادك , ترا محد بيساعدك كذا ! -- Server Side # local marker1 = createMarker ( 2759.8745117188,-2015.3276367188,12.9000000, 'cylinder', 0.70, 252, 0, 252 ); local marker2 = createMarker ( 2127.2795410156,-1778.0109863281,13.357691574097, 'cylinder', 0.70, 252, 0, 252 ); for _, p in ipairs( getElementsByType ( 'player' ) ) do bindKey ( p, 'h', 'down', Animation ); end addEventHandler ( 'onPlayerJoin', root,function ( ) bindKey ( source, 'h', 'down', Animation ); end ) function Animation ( plr ) if ( isElementWithinMarker(plr, marker1) ) or ( isElementWithinMarker(plr, marker2) ) then if ( getPlayerMoney ( plr ) >= 150 ) then takePlayerMoney ( plr, 150 ); setElementFrozen ( plr, true ) setTimer (setElementFrozen, 5500, 1, plr, false) setPedArmor ( plr, 100 ); setPedAnimation ( plr, 'FOOD', 'EAT_Burger', _, false, _, _, false ); exports['topbarchat']:sendClientMessage ( ' لقد قمت بشراء العصير ', plr, 0, 255, 255, true ) exports['topbarchat']:sendClientMessage ( '150$ ', plr, 0, 255, 255, true ) else exports['topbarchat']:sendClientMessage ( '* لا يوجد لديك المال الكافي لشراء العصير ', plr, 0, 252, 255, true ) exports['topbarchat']:sendClientMessage ( '150$ ', plr, 0, 252, 255, true ) end end end addEventHandler ( 'onMarkerLeave', root,function ( player ) if source == marker1 or source == marker2 then if ( getElementType ( player ) == 'player' ) then exports['topbarchat']:sendClientMessage ( ' H أذا أردت شراء العصير اضغط ', player, 255, 0, 255, true ) exports['topbarchat']:sendClientMessage ( ' 150$ بمبلغ ', player, 255, 0, 255, true ) end end end ) Link to comment
αвυ-wαleed Posted February 15, 2014 Author Share Posted February 15, 2014 ذا بست معى الأيام بتحسن قد كنت ما اعرف شيء الحين احس اني افضل والترتيب ابشر لكن تأكد من الوظيفة لاهنت معد اشترى Link to comment
αвυ-wαleed Posted February 15, 2014 Author Share Posted February 15, 2014 أي احد يجي يخارجني خخخخخخ تورطت Link to comment
αвυ-wαleed Posted February 16, 2014 Author Share Posted February 16, 2014 هنا ابغى مساعده قسم سيفووووون Link to comment
αвυ-wαleed Posted February 16, 2014 Author Share Posted February 16, 2014 ERROR: exports: Call to non-running server resource (topbarchat) [string"?"] Link to comment
αвυ-wαleed Posted February 16, 2014 Author Share Posted February 16, 2014 مشغله وماظبط Link to comment
Mr.T9 Posted February 16, 2014 Share Posted February 16, 2014 تاكد ان اسم المود topbarchat 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