Jump to content

Clydian

Members
  • Posts

    48
  • Joined

  • Last visited

About Clydian

  • Birthday 24/02/2000

Details

  • Gang
    Tuner
  • Location
    Latvia, Aizpute
  • Interests
    Love motorbikes, love fixing them, love driving them :D Wanna learn scripting.

Clydian's Achievements

Rat

Rat (9/54)

0

Reputation

  1. Use a table, for loop and setTimer to make this local cameraPos = { [1] = {0, 0, 0, 2, 2, 2} [2] = {2, 2, 2, 0, 0, 0} } cameraTimerPosition = 0 for _, position in ipairs(cameraPos) do cameraTimerPosition = cameraTimerPosition + 10000 setTimer(moveCamera, cameraTimerPosition, 1, position) end function moveCamera(position) local x, y, z, lx, ly, lz = getCameraMatrix() smoothMoveCamera(x, y, z, lx, ly, lz, position[1], position[2], position[3], position[4], position[5], position[6], 1000) end Cheers lad. Cookie to you
  2. I set the Timer to 50 but it didnt change nothing. Where do you want me to put "onClientResourceStart"? EDIT: i set it to 5000 and it works. So thats fixed. Thanks. And theres another thing, basicly when the camera moves to that x2,y2,z2, can i somehow make that the camera moves somewhere else?
  3. im sorry, but i have no idea what that means.
  4. But why douesnt this work? local sm = {} sm.moov = 0 sm.object1,sm.object2 = nil,nil local function removeCamHandler() if(sm.moov == 1)then sm.moov = 0 end end local function camRender() if (sm.moov == 1) then local x1,y1,z1 = getElementPosition(sm.object1) local x2,y2,z2 = getElementPosition(sm.object2) setCameraMatrix(x1,y1,z1,x2,y2,z2) end end addEventHandler("onClientPreRender",root,camRender) function smoothMoveCamera(x1,y1,z1,x1t,y1t,z1t,x2,y2,z2,x2t,y2t,z2t,time) if(sm.moov == 1)then return false end sm.object1 = createObject(1337,x1,y1,z1) sm.object2 = createObject(1337,x1t,y1t,z1t) setElementAlpha(sm.object1,0) setElementAlpha(sm.object2,0) setObjectScale(sm.object1,0.01) setObjectScale(sm.object2,0.01) moveObject(sm.object1,time,x2,y2,z2,0,0,0,"InOutQuad") moveObject(sm.object2,time,x2t,y2t,z2t,0,0,0,"InOutQuad") sm.moov = 1 setTimer(removeCamHandler,time,1) setTimer(destroyElement,time,1,sm.object1) setTimer(destroyElement,time,1,sm.object2) return true end fadeCamera ( false, 0, 0,0,0 ) smoothMoveCamera (1715.978515625, -1732.900390625, 19.510538101196, 1750.73046875, -1732.919921875, 15.30633354187, 1814.8818359375, -1732.6376953125, 28.479869842529, 1750.73046875, -1732.919921875, 15.30633354187, 1) setTimer(function () fadeCamera ( true, 1, 0,0,0 ) end, 1000, 1)
  5. So i have a simple login, theres a picture in background. I want to change the picture, to a flying camera effect around Los Santos. How do i do that? I can just make it look at one position. fadeCamera ( false, 0, 0,0,0 ) setCameraMatrix (1217.103515625, -1307.1328125, 52.016986846924, 1131.939453125, -1352.66796875, 49.851699829102) setTimer(function () fadeCamera ( true, 1, 0,0,0 ) end, 1000, 1) This make the camera near LSPD and looks at a fountain. I want the camera to rotate around the fountain.
  6. Big thanks to you man, Will take a look at all those things. And one more, should i make an mysql database for the server, or its not needed at all?
  7. Hello everyone, so i want to lear the MTA scripting for a while now. All i've been doing is edit scripts so far. So i thought, maybe i should try to make something easy. So i had an idea. an someone point me thr right way, to start make a script, where i can buy a property, the property gives player money each five minutes. Then the player can sell it, or if player quits, it sells automaticly. I thought it would be fun making it. Any idead where to start? I Also would like to make armor pickups randomly around San Andreas.
  8. Still the same.. Like. i dont een know
  9. Nothing in debugscript Thats the full code Cords are correct
  10. The basic thing still wont work. The ped is not showing
  11. local L0_0 L0_0 = createPed L0_0 = L0_0(280, 1560.900390625, -1680.2060546875, 64.498291015625) setPedRotation(L0_0, 0) setElementFrozen(L0_0, true) setElementDimension(L0_0, 3) setElementInterior(L0_0, 22) setElementData(L0_0, "talk", 1, false) setElementData(L0_0, "name", "SGT J. McDonald", false) function popuppdPedMenu() local L0_1, L1_2, L2_3, L3_4, L4_5, L5_6 L0_1 = getElementData L1_2 = getLocalPlayer L1_2 = L1_2() L2_3 = "exclusiveGUI" L0_1 = L0_1(L1_2, L2_3) if L0_1 then return end L0_1 = _UPVALUE0_ if not L0_1 then L0_1 = 200 L1_2 = 150 L2_3 = guiGetScreenSize L3_4 = L2_3() L4_5 = L2_3 / 2 L5_6 = L0_1 / 2 L4_5 = L4_5 - L5_6 L5_6 = L3_4 / 2 L5_6 = L5_6 - L1_2 / 2 _UPVALUE0_ = guiCreateWindow(L4_5, L5_6, L0_1, L1_2, "How can we help you?", false) bPhotos = guiCreateButton(0.05, 0.2, 0.87, 0.2, "I want to report a crime.", true, _UPVALUE0_) addEventHandler("onClientGUIClick", bPhotos, helpButtonFunction, false) bAdvert = guiCreateButton(0.05, 0.5, 0.87, 0.2, "I want to speak to an Officer.", true, _UPVALUE0_) addEventHandler("onClientGUIClick", bAdvert, appointmentButtonFunction, false) bSomethingElse = guiCreateButton(0.05, 0.8, 0.87, 0.2, "I'm fine, thanks.", true, _UPVALUE0_) addEventHandler("onClientGUIClick", bSomethingElse, otherButtonFunction, false) triggerServerEvent("pd:ped:start", getLocalPlayer(), getElementData(_UPVALUE1_, "name")) showCursor(true) end end addEvent("pd:popupPedMenu", true) addEventHandler("pd:popupPedMenu", getRootElement(), popuppdPedMenu) function closepdPedMenu() destroyElement(_UPVALUE0_) _UPVALUE0_ = nil showCursor(false) end function helpButtonFunction() closepdPedMenu() triggerServerEvent("pd:ped:help", getLocalPlayer(), getElementData(_UPVALUE0_, "name")) end function appointmentButtonFunction() closepdPedMenu() triggerServerEvent("pd:ped:appointment", getLocalPlayer(), getElementData(_UPVALUE0_, "name")) end function otherButtonFunction() closepdPedMenu() end
  12. So i have a problem, i cant connect to ANY server. its shors that theres some sort of problem witch connecting.. When i enter, it starts downloading, and then it shows that i cant connect. i have fresh GTA SA, no modded, and firewall is off..
  13. same error as it showed before
×
×
  • Create New...