iMr.G[7]A Posted March 19, 2014 Share Posted March 19, 2014 السلام عليكم ابيكم شباب تجيبون لي الكود هاذا كامل من تحت الاَرض مكان الكتابة الي فوق الماركر كود PHP: Marker = createMarker (2483.09277, -1663.10498, 13.33595, "cylinder" ,0) setElementData(Marker,"message","[حيآك في ورشة السيرفر]") Link to comment
فاّرس Posted March 19, 2014 Share Posted March 19, 2014 PHP? هذا تقدر تسويه من خلال , onClientRender createMarker getElementPosition -- localPlayer getElementPosition -- marker getDistanceBetweenPoints3D getScreenFromWorldPosition dxDrawText setElementData getElementData وتقدر تسوي زي طلبك فوق ذذ Link to comment
#DRAGON!FIRE Posted March 19, 2014 Share Posted March 19, 2014 addEventHandler( "onClientRender", root, function ( ) local CameraMX, CameraMY, CameraMZ = getCameraMatrix( ) local Mx, My, Mz = getElementPosition( marker ) if ( getDistanceBetweenPoints3D( Mx, My, Mz, CameraMX, CameraMY, CameraMZ ) <= 15 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( Mx, My, Mz +1, 0.06 ) if ( WorldPositionX and WorldPositionY ) then dxDrawText ( "Text", WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, tocolor(255,0,0,255), 2, "arial" ) end end end ) Link to comment
abu5lf Posted March 19, 2014 Share Posted March 19, 2014 جبته من تحت الارض : function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do if getElementDimension( marker ) == dimension then local px, py, pz = getElementPosition( marker ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 20 then local text = getElementData( marker, "message" ) if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 3 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 0, 255, 255 ), 3, "Tahoma", "center", "center" ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) Marker = createMarker (2483.09277, -1663.10498, 13.33595, "cylinder" ,0) setElementData(Marker,"message","[حيآك في ورشة السيرفر]") الكود مب لي انا افقط جبته لك ! Link to comment
mouamle Posted March 20, 2014 Share Posted March 20, 2014 جبته من تحت الارض :function renderIng( ) local x, y, z = getCameraMatrix( ) local dimension = getElementDimension( localPlayer ) for key, marker in ipairs ( getElementsByType( "marker", resourceRoot ) ) do if getElementDimension( marker ) == dimension then local px, py, pz = getElementPosition( marker ) local distance = getDistanceBetweenPoints3D( px, py, pz, x, y, z ) if distance <= 20 then local text = getElementData( marker, "message" ) if text and ( distance < 3 or isLineOfSightClear( x, y, z, px, py, pz + 1.7, true, true, true, true, false, false, true, localPlayer ) ) then local sx, sy = getScreenFromWorldPosition( px, py, pz + 1.7 ) if sx and sy then local w = dxGetTextWidth( tostring( text ) ) local h = ( text and 3 or 1 ) * dxGetFontHeight( ) dxDrawText( tostring( text ), sx, sy, sx, sy, tocolor( 255, 0, 255, 255 ), 3, "Tahoma", "center", "center" ) end end end end end end addEventHandler( "onClientRender", getRootElement( ),renderIng) Marker = createMarker (2483.09277, -1663.10498, 13.33595, "cylinder" ,0) setElementData(Marker,"message","[حيآك في ورشة السيرفر]") الكود مب لي انا افقط جبته لك ! أنت روعة دورت على الكود كثير وهسه لقيتو بس المشكله ما أبي الماركر أزرق أبي شفاف Link to comment
iMr.G[7]A Posted March 20, 2014 Author Share Posted March 20, 2014 اصح الكود ذا قصدي كان فيه يسوي تيم تومتيك ويدخلونة اول ما يدخلو السيرفر team = createTeam ( "Zombies Killer", 3, 255, 0 ) setTeamFriendlyFire ( getTeamFromName( "Zombies Killer" ), false ) addEventHandler( "onPlayerJoin", root, function( ) setPlayerTeam( source, getTeamFromName( "Zombies Killer" ) ) end ) Link to comment
G.KinG Posted March 20, 2014 Share Posted March 20, 2014 اصح الكود ذا قصدي كان فيه يسوي تيم تومتيك ويدخلونة اول ما يدخلو السيرفر team = createTeam ( "Zombies Killer", 3, 255, 0 ) setTeamFriendlyFire ( getTeamFromName( "Zombies Killer" ), false ) addEventHandler( "onPlayerJoin", root, function( ) setPlayerTeam( source, getTeamFromName( "Zombies Killer" ) ) end ) function Everyone1 () Everyone = createTeam ( "Zombie Killer", 255, 255, 255 ) end addEventHandler("onResourceStart", resourceRoot, Everyone1) function setEveryone() if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Everyone")) then setPlayerTeam(source, Everyone) end end addEventHandler("onPlayerLogin",getRootElement(),setEveryone) Link to comment
iPrestege Posted March 20, 2014 Share Posted March 20, 2014 local theTeam = createTeam ( 'Zombies Killer', 3, 255, 0 ) setTeamFriendlyFire ( theTeam,false ) addEventHandler( 'onPlayerJoin', root, function( ) if theTeam then setPlayerTeam( source,theTeam ) end end ) Link to comment
iMr.G[7]A Posted March 20, 2014 Author Share Posted March 20, 2014 برستيج لو سمحت جاتني مشكلة اذا مات احد يرجع بدون تيم يطرده من التيم لو مات Link to comment
iPrestege Posted March 20, 2014 Share Posted March 20, 2014 فية سكربت اذا سوا سباون يشيل التيم منة أكيد شيك على موداتك . Link to comment
iMr.G[7]A Posted March 20, 2014 Author Share Posted March 20, 2014 واذا ماليقتة وش الحل Link to comment
iPrestege Posted March 20, 2014 Share Posted March 20, 2014 واذا ماليقتة وش الحل سويت اضافة اذا صار سباون للاعب بعد ثانيتين يحطة بالتيم : local theTeam = createTeam ( 'Zombies Killer', 3, 255, 0 ) setTeamFriendlyFire ( theTeam,false ) addEventHandler( 'onPlayerJoin', root, function( ) if theTeam then setPlayerTeam( source,theTeam ) end end ) addEventHandler ( 'onPlayerSpawn',root, function ( ) setTimer ( setPlayerTeam,2000,1,source,theTeam ) 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