Ballasbuster Posted February 14, 2011 Share Posted February 14, 2011 Hi Dudes, I did a script on camera from the matrix at the entrance to the server. But I do not know how to do this disappeared after logging. Please help fast. function setCameraOnPlayerJoin() fadeCamera(source, true, 2) setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) Sorry my bad English Link to comment
Discord Moderators Zango Posted February 14, 2011 Discord Moderators Share Posted February 14, 2011 by logging you mean logging in? something like this: function setCameraOnPlayerJoin() fadeCamera(source, true, 2) setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) addEventHandler ('onPlayerLogin', source, function() setCameraTarget (source, source) end) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) Link to comment
Ballasbuster Posted February 14, 2011 Author Share Posted February 14, 2011 Good work, thanks. But could you help me with the exception of the hud, radar and chat at the time of the camera? Link to comment
Discord Moderators Zango Posted February 15, 2011 Discord Moderators Share Posted February 15, 2011 do you mean the hud, radar and chat being disabled for as long as the camera matrix is set? local hudComponents = {'ammo', 'area_name', 'armour', 'breath', 'clock', 'health', 'money', 'radar', 'vehicle_name', 'weapon'} function setCameraOnPlayerJoin() fadeCamera(source, true, 2) setCameraMatrix(source, 363.19458007813, -1989.0324707031, 21.265274047852, 31.334917297363, 0, 197) showChat (source, false) for _, component in ipairs (hudComponents) do showPlayerHudComponent (source, component, false) end addEventHandler ('onPlayerLogin', source, function() setCameraTarget (source, source); for _, component in ipairs (hudComponents) do showPlayerHudComponent (source, component, true) end; showChat (source, true) end ) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) soz about the looks, written quickly inside post edit: fixed Link to comment
Ballasbuster Posted February 15, 2011 Author Share Posted February 15, 2011 I did as you asked, but now I do not show the camera only spawns. ///EDIT Okey , I repair This . And if we can do such a black box? Link to comment
12p Posted February 15, 2011 Share Posted February 15, 2011 black box? what do you mean? Link to comment
Ballasbuster Posted February 15, 2011 Author Share Posted February 15, 2011 I mean Widescreen... So you can help me? Link to comment
12p Posted February 15, 2011 Share Posted February 15, 2011 I still don't get you, your english is a bit poor and you don't explain well... What do you wanna do? PS. If you can't explain it, use IMAGES. Link to comment
Castillo Posted February 15, 2011 Share Posted February 15, 2011 I think i know what does he mean, he wants a wide screen, that should mean 2 images or 2 rectangles in top of screen and bottom. Link to comment
Aibo Posted February 15, 2011 Share Posted February 15, 2011 local black = tocolor(0,0,0,255) local screenWidth, screenHeight = guiGetScreenSize() local boxHeight = screenHeight/5 function drawLetterBox() dxDrawRectangle(0, 0, screenWidth, boxHeight, black) dxDrawRectangle(0, screenHeight-boxHeight, screenWidth, boxHeight, black) end addEventHandler("onClientRender", getRootElement(), drawLetterBox) 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