Jump to content

aneco

Members
  • Posts

    17
  • Joined

  • Last visited

aneco's Achievements

Square

Square (6/54)

0

Reputation

  1. now i created this but when i type i cant hear any sound from vehicle how can i fix this. when i load this for server-side i get:attempt to cal global 'playsound' (a nil value) when i load this for client-side no error and no music. function playmusic ( source, commandName ) local x, y, z = getElementPosition ( source ) --Get the players position local sound = playSound3D("music.mp3") attachElements ( music, source, 0, 0, 5 ) --attach music. end addCommandHandler ( "play", playmusic )
  2. hello i created a playsound3d entity and now i want to attach it to special car but i cant find attachtocar command. here is code for playsound3d playSound3D("music.mp3", -2050.9133300781, 168.4600982666, 28.8359375, true)
  3. am i allowed to place damaged cars in mta map editor.or some opened doors? that would be cool
  4. aneco

    About Zday

    i know how to do this but i want a area become zombie proof.
  5. aneco

    About Zday

    hi im going to make a zombie map but i want special spawn area with out zombies how can i do that. by the way zombies dont have any spawnpoint they are spawning in whole map.
  6. aneco

    Open And Close

    Hi everyone i need a command that ables user to switch replace skin to original skin.like stopping the script.but when i stop script other players cant see it too so i need a script that only affects that player. sorry for my bad english. if you dont understand i can make screenshots.
  7. edit:i edited with the code it seems like have a error so im fixed it.im not sharing it here without permission.
  8. thanks for your answer. function rotate(source, key, keyState) if key =="mouse_wheel_up" then rx,ry,rz = getObjectRotation(object) setObjectRotation ( object, rx,ry,rz - 5 ) end if key =="mouse_wheel_down" then rx,ry,rz = getObjectRotation(object) setObjectRotation ( object, rx,ry,rz + 5) end bindKey(playerSource, "mouse_wheel_up", "down", rotate) bindKey(playerSource, "mouse_wheel_down", "down", rotate) i made function like this but i dont know where i need to put this into resource. sorry for my bad english.
  9. Hello everyone first of all my problem is when i spawn somethink from gmes https://community.multitheftauto.com/index.php?p= ... ls&id=3070 im not able to rotate it i searched wiki for rotate object function but i cant find it.is anyone help me about rotatin object.
  10. is it only me?i cant rotate any objects is this added or not?
  11. it doesnt work when i f2 it dopesnt do anythink i tried to run script clientside and serverside too but didnt worked
  12. where i should put this code to script.i make like this. local x, y, z, x1, y1, z1 local fpcam = false bindKey( "F2", "down", function() if fpcam then setCameraTarget(getLocalPlayer(), getLocalPlayer()) end fpcam = not fpcam end ) addEventHandler("onClientPreRender", root, function() if fpcam then x, y, z = getPedBonePosition(getLocalPlayer(), 6) setCameraMatrix(x, y, z, x + x1, y + y1, z + z1) dxDrawImage(screenWidth/2-10, screenHeight/2-10, 20, 20, "images/aimer.png") local tarX, tarY, tarZ = getWorldFromScreenPosition(screenWidth/2, screenHeight/2, 30) setPedAimTarget(getLocalPlayer(), tarX, tarY, tarZ) function getPointFromDistanceRotation(x,y,dist,angle) local a=math.rad(90-angle) local dx=math.cos(a)*dist local dy=math.sin(a)*dist return x+dx,y+dy if getControlState"left" or getControlState"right" then local _,_,Zrot=getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) wx,wy=getPointFromDistanceRotation(cx,cy,((cx-wx)^2+(cy-wy)^2)^0.5,Zrot) end end end ) addEventHandler("onClientCursorMove", root, function( _, _, _, _, wx, wy, wz ) local cx, cy, cz = getCameraMatrix() x1 = ( wx - cx ) / 300 y1 = ( wy - cy ) / 300 z1 = ( wz - cz ) / 300 end )
  13. okey but do you help me about fix?
  14. hi i found a script which player press f2 and have first person camera but i have a problem when player steers a car the cam wont steer and player have to steer camera via mouse i couldnt make a fix for this and i need some help please help me i need this code soo much. Here is the code which i found local x, y, z, x1, y1, z1 local fpcam = false bindKey( "F2", "down", function() if fpcam then setCameraTarget(getLocalPlayer(), getLocalPlayer()) end fpcam = not fpcam end ) addEventHandler("onClientPreRender", root, function() if fpcam then x, y, z = getPedBonePosition(getLocalPlayer(), 6) setCameraMatrix(x, y, z, x + x1, y + y1, z + z1) dxDrawImage(screenWidth/2-10, screenHeight/2-10, 20, 20, "images/aimer.png") local tarX, tarY, tarZ = getWorldFromScreenPosition(screenWidth/2, screenHeight/2, 30) setPedAimTarget(getLocalPlayer(), tarX, tarY, tarZ) end end ) addEventHandler("onClientCursorMove", root, function( _, _, _, _, wx, wy, wz ) local cx, cy, cz = getCameraMatrix() x1 = ( wx - cx ) / 300 y1 = ( wy - cy ) / 300 z1 = ( wz - cz ) / 300 end )
×
×
  • Create New...