Try Posted July 22, 2011 Share Posted July 22, 2011 Hellloooo guysss again! I have a question how i can do the camera move at the map without the player Like a video and its possible camera target a object? Link to comment
Castillo Posted July 23, 2011 Share Posted July 23, 2011 Maybe you mean 'freecam'? is a resource that comes with MTA when you install it. Link to comment
NotAvailable Posted July 23, 2011 Share Posted July 23, 2011 Do you want to make the camera moving to a certain position? So like when you join u see the camera moving to a house for example? Link to comment
Try Posted July 23, 2011 Author Share Posted July 23, 2011 No and no I need like start at a point the it show like a vehicle flying and stoping at the airport then the camera show at the player like a mini video Link to comment
NotAvailable Posted July 26, 2011 Share Posted July 26, 2011 ooh Here is my intro script: --MADE BY JESSEUNIT --RE-DISTRIBUTE NOT ALLOWED --DONT REMOVE THIS TAG --©, 2011 function tuto() local guy = getPlayerAccount(source) --If he is new show the intro if (getAccountData(guy,"Achievement: New Guy") == false ) then --Spawn the player so he is not stuck spawnPlayer (source, -3255.5166015625+math.random(0,0), 1848.876953125+math.random(0,0), 9.8706741333008, 178.27844238281, math.random(265,312)) setCameraTarget(source, true) --Disable HUD showPlayerHudComponent(source, "radar", false) showChat(source, false) --Put the camera infront of the house and other stuff fadeCamera(source, false) setTimer(fadeCamera, 4500, 1, source, true) setTimer(setElementPosition, 3000, 1, source, -3255.5166015625+math.random(0,0.5), 1848.876953125+math.random(0,1), 9.8706741333008, 178.27844238281) setTimer(setElementRotation, 3000, 1, source, 0, 0, 178.27844238281) setTimer(setPedAnimation, 4600, 1, source, "ped", "getup_front") setTimer(setPedAnimation, 5750, 1, source, "ped", "IDLE_stance") setTimer(setPedAnimation, 6200, 1, source, "ped", "WALK_civi") setTimer(setCameraMatrix, 4000, 1, source, -3256.9641113281, 1833.8905029297, 13.224102973938, -3256.3107910156, 1850.1762695313, 9.8706741333008, 0, 0) --He is bored, let him play. setTimer(setElementPosition, 13900, 1, source, -3255.1701660156+math.random(0,0), 1838.9616699219+math.random(0,0), 10.8706741333008, 192.73875427246) setTimer(fadeCamera, 12000, 1, source, false) setTimer(fadeCamera, 15000, 1, source, true) setTimer(setCameraTarget, 14500, 1, source) --Enable HUD back setTimer(showPlayerHudComponent, 13900, 1, source, "radar", true) setTimer(showChat, 13900, 1, source, true) else --if he is NOT new, spawn him. outputChatBox("Welcome back!", source, 0, 240, 0, false) fadeCamera(source, true) spawnPlayer (source, -3255.1701660156+math.random(0,3), 1838.9616699219+math.random(0,3), 9.8706741333008, 192.73875427246, math.random(265,312)) setCameraTarget(source, true) end end addEventHandler("onPlayerLogin", getRootElement(), tuto) I remove this code within 1 week (Due to script stealers, so make sure you copy & paste it) Link to comment
will briggs Posted July 26, 2011 Share Posted July 26, 2011 I really wouldnt bother removing anything, unless they have the rest of the script, Which they probably dont. There aint no point of taking it ^^ Link to comment
Try Posted July 26, 2011 Author Share Posted July 26, 2011 Humm :\ sorrryy but i think u fail I need now the camera target at the object then the player login obj = createObject(1220,0,0,3) setElementAlpha(obj,0) setCameraTarget(source,obj) moveObject(obj,20000,1,1,3) possitions its exemples Link to comment
JR10 Posted July 26, 2011 Share Posted July 26, 2011 Something like: Just an example to show you how. --client side addEventHandler("onClientPreRender", root, function() local x, y, z = getElementPosition(obj) setCameraMatrix(0, 0, 0, x, y, z) end) Here, 0,0,0 are where the camera will stay. x,y,z are the coords of the object and the camera will keep rotation with the obj, something like exactly what you want. However, you need to trigger a client event that will add that handler, maybe pass the object somehow. And then later when the intro is done trigger a client event that will remove the event handler, or just make a timer. Link to comment
will briggs Posted July 26, 2011 Share Posted July 26, 2011 Humm :\ sorrryy but i think u fail Tah, Most people hate me and think i fail : Link to comment
Jaysds1 Posted July 27, 2011 Share Posted July 27, 2011 No shouldn't hate you in these forums... Sometime people just confuse other people and say there a fail... but really them selves is a fail. Link to comment
Try Posted July 27, 2011 Author Share Posted July 27, 2011 Ok Thanks but its possible to fade the camera at the object??? Link to comment
Jaysds1 Posted July 27, 2011 Share Posted July 27, 2011 ya, it's possible to fade a camera at a object... but first use setCameraTarget... Link to comment
JR10 Posted July 27, 2011 Share Posted July 27, 2011 setCameraTarget?, why? setCameraTarget currently works only with players, so you can't set the camera target on an object. Link to comment
Jaysds1 Posted July 27, 2011 Share Posted July 27, 2011 I meant setCameraTarget serverside... the player and the element which is the object... Link to comment
JR10 Posted July 27, 2011 Share Posted July 27, 2011 setCameraTarget server/client side only works on players This function allows you to set a player's camera to follow other elements instead. Currently supported element type is:Players 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