EH10 Posted January 6, 2014 Share Posted January 6, 2014 السلام عليكم ورحمة الله وبركاتة ابي فنكشات اذا كتبت باف8 Shop يجي قدام الاعب الي كتب ماركر واي واحد يدخل الماركر يجية شوب والي يشتري من الشوب يجي الفلوس للي فاتح الماركر والي يبيع يجية فريز مشان مايتحرك واذا كتب Shop ثاني مره يختفي الماركر وينفك الفريز ابي الفنكشات مع الشرح + كل شي Link to comment
فاّرس Posted January 6, 2014 Share Posted January 6, 2014 نفس الفكره , viewtopic.php?f=160&t=68538&hilit=plr&start=15 Link to comment
EH10 Posted January 6, 2014 Author Share Posted January 6, 2014 انتا عسل بس ممكن تقولي الكود ذا وش يسوي بضبط local markers = { } addCommandHandler( "markerC", function( player ) if isElement( markers[player] ) then destroyElement( markers[player] ) end local x,y,z = getElementPosition( player ) markers[player] = createMarker( x, y, z, "cylinder", 3, 255, 0, 2 ) setElementData( markers[player], "Creater", player ) end ) addEventHandler( "onMarkerHit", resourceRoot, function( hitElement ) if getElementType( hitElement ) == "player" then triggerClientEvent( hitElement, "open_window", hitElement, source ) end end ) addEvent( "Trigger", true ) addEventHandler( "Trigger", root, function( marker ) local player = getElementData( marker, "Creater" ) if getPlayerMoney( source ) >= 100 and isElement( player ) then takePlayerMoney( source, 100 ) givePlayerMoney( player, 50 ) end end ) * Client side : local theMarker = false addEventHandler( "onClientGUIClick", button, function( ) triggerServerEvent( "Trigger", localPlayer, theMarker ) end, false ) addEvent( "open_window",true ) addEventHandler( "open_window", root, function( marker ) guiSetVisible( window, true ) showCursor( true ) theMarker = marker end ) Link to comment
فاّرس Posted January 6, 2014 Share Posted January 6, 2014 الكود هذا تكتب امر من اف8 ويسوي لك ماركر , واي واحد يلمسه تنفتح له لوحه , واذا ضغط زر من اللوحه يعطي الي سوى الماركر فلوس , ويسحب من الي ضغط الزر Link to comment
EH10 Posted January 6, 2014 Author Share Posted January 6, 2014 الكود هذا تكتب امر من اف8 ويسوي لك ماركر , واي واحد يلمسه تنفتح له لوحه , واذا ضغط زر من اللوحه يعطي الي سوى الماركر فلوس , ويسحب من الي ضغط الزر ممكن تخلي ماحد يقدر ياخذ الوظيفة ذي الى تيم معين Link to comment
فاّرس Posted January 6, 2014 Share Posted January 6, 2014 جاك الكود جاهز حاول تسوي ؟ يعني كلها شرط يوم يسوي الماركر ذذ Link to comment
EH10 Posted January 6, 2014 Author Share Posted January 6, 2014 جاك الكود جاهز حاول تسوي ؟ يعني كلها شرط يوم يسوي الماركر ذذ اذا ماعليك امر Link to comment
فاّرس Posted January 6, 2014 Share Posted January 6, 2014 -- Server Side # local markers = { } addCommandHandler( "markerC", function( player ) if isElement( markers[player] ) then destroyElement( markers[player] ) end if ( getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) == 'teamName' ) then local x,y,z = getElementPosition( player ) markers[player] = createMarker( x, y, z, "cylinder", 3, 255, 0, 2 ) setElementData( markers[player], "Creater", player ) end end ) addEventHandler( "onMarkerHit", resourceRoot, function( hitElement ) if getElementType( hitElement ) == "player" then triggerClientEvent( hitElement, "open_window", hitElement, source ) end end ) addEvent( "Trigger", true ) addEventHandler( "Trigger", root, function( marker ) local player = getElementData( marker, "Creater" ) if getPlayerMoney( source ) >= 100 and isElement( player ) then takePlayerMoney( source, 100 ) givePlayerMoney( player, 50 ) end end ) teamName = سطر 6 , استبدله بإسم التيم Link to comment
EH10 Posted January 6, 2014 Author Share Posted January 6, 2014 -- Server Side # local markers = { } addCommandHandler( "markerC", function( player ) if isElement( markers[player] ) then destroyElement( markers[player] ) end if ( getPlayerTeam(player) and getTeamName(getPlayerTeam(player)) == 'teamName' ) then local x,y,z = getElementPosition( player ) markers[player] = createMarker( x, y, z, "cylinder", 3, 255, 0, 2 ) setElementData( markers[player], "Creater", player ) end end ) addEventHandler( "onMarkerHit", resourceRoot, function( hitElement ) if getElementType( hitElement ) == "player" then triggerClientEvent( hitElement, "open_window", hitElement, source ) end end ) addEvent( "Trigger", true ) addEventHandler( "Trigger", root, function( marker ) local player = getElementData( marker, "Creater" ) if getPlayerMoney( source ) >= 100 and isElement( player ) then takePlayerMoney( source, 100 ) givePlayerMoney( player, 50 ) end end ) teamName = سطر 6 , استبدله بإسم التيم شكرا ياجميل 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