Jump to content

lcd1232

Members
  • Posts

    96
  • Joined

  • Last visited

Everything posted by lcd1232

  1. localPlayer не нравится как пишется) А root думал только серверный. А какая собственно разница?
  2. So how we can help u if we don't know how works your exp system?
  3. https://wiki.multitheftauto.com/wiki/Ge ... BoundToKey
  4. lcd1232

    Scoreboard

    https://forum.multitheftauto.com/viewtopic.php?f ... ge#p737319
  5. we can't solve your problem because u gave us code where button isn't created.
  6. if u use resource exp system read this https://wiki.multitheftauto.com/wiki/Re ... Exp_system if not show your code of exp resource
  7. Код покажите. Ранее я делал подобное с setCameraMatrix, но так как с математикой у меня не очень, были мелкие баги. Но как появилась getCamera() на стороне клиента - я быстренько всё это переписал. Собственно тут всё просто, получаете элемент камеры, атачите её к чему нужно и всё. Если нужно реализовать вращение - то есть setElementAttachedOffsets. Сначала попробовал примерно так (код не помню написал по-быстрому, поэтому не тестился) local player = getLocalPlayer() local r_root = getRootElement() local camera addEventHandler( 'onClientVehicleEnter', r_root, function ( thePlayer, theSeat ) if thePlayer == player and theSeat == 0 then if isElement( camera ) then destroyElement( camera ) end local x, y, z = getPedBonePosition( thePlayer, 8 ) camera = createObject( 3803, x, y, z ) setElementAlpha( camera, 0 ) attachElements( thePlayer, camera ) setCameraTarget( camera ) end end) addEventHandler( 'onClientVehicleStartExit', r_root, function ( thePlayer ) if thePlayer == player then if isElement( camera ) then destroyElement( camera ) end setCameraTarget( thePlayer ) end end) И в нем была проблема в том, что attachElements и setCameraTarget возвращали false. Потом попробовал как в ресурсе cockpit, но камера стала показывать внутренности машины (я так и не понял куда направлялась камера). Потом решил через getCamera() local player = getLocalPlayer() local r_root = getRootElement() local camera = getCamera() addEventHandler( 'onClientVehicleEnter', r_root, function ( thePlayer, theSeat ) if thePlayer == player and theSeat == 0 then local x, y, z = getPedBonePosition( thePlayer, 8 ) setCameraTarget( x, y, z ) setCameraClip( true, false ) end end) addEventHandler( 'onClientVehicleStartExit', r_root, function ( thePlayer ) if thePlayer == player then setCameraTarget( thePlayer ) setCameraClip( true, true ) end end) Получилось как-будто я и не писал код вообще. Хотелось все таки как-то покрасивей и попроще, в итоге ничего не получилось.
  8. maybe this script on client-side? Show your meta.xml
  9. Как создать вид от первого лица из машины? ресурс cockpit делает это криво и + нельзя двигать камеру. Пробовал приаттачить камеру к позиции лица, но результат, как будто ничего не произошло.
  10. А кто-то может скинуть название чита в личку? Уж очень интересно.
  11. lcd1232

    bindkey

    Why ","? Maybe this symbol ' ? Or see this https://wiki.multitheftauto.com/wiki/Key_names
  12. setTimer( addTeamBlip, 1000*10, 0 ) -- 1000 msec = 1 sec
  13. Try this function onPlayerBuildAWireFence(itemName) setElementData(source, itemName, getElementData(source, itemName) -1) setPedAnimation(source, "BOMBER", "BOM_Plant", -1, false, false, nil, false) local source = source setTimer(function() local x, y, z = getElementPosition(source) local xr, yr, zr = getElementRotation(source) px, py, pz = getElementPosition(source) prot = getPedRotation(source) local offsetRot = math.rad(prot + 90) local vx = px + 1 * math.cos(offsetRot) local vy = py + 1 * math.sin(offsetRot) local vz = pz + 2 local vrot = prot + 90 tent = createObject(983, vx, vy, pz, xr, yr, vrot) setObjectScale(tent, 1) tentCol = createColSphere(x, y, z, 2) attachElements(tentCol, tent, 0, 0, 0) setElementData(tentCol, "parent", tent) setElementData(tent, "parent", tentCol) setElementData(tentCol, "wirefence", true) triggerClientEvent(source, "refreshInventoryManual", source) setPedAnimation(source) end, 1500, 1) end
  14. maybe try use instead of `` this '' or this ""
  15. lcd1232

    Problems :/

    I think variable k is not determine. Try smthing like this. addEventHandler( "onMarkerHit", marker[1], showT )
  16. Зачем нужны функции textDisplay? Это же по сути тот же dxDraw только серверный или я не прав?
  17. Вот это ему нужно убрать.
  18. I need another way because it's too bad for me/
  19. Hello. I want replace this local Table = { level = 1, maxcount = 1000 + 1000 * Table.level } something like this local Table = { level = 1, maxcount = 1000 + 1000 * self.level } How does it make?
  20. Как получить таблицу находясь в ней? т.е. я хочу чтобы local Table = { name = 'test', level = 1, maxcount = 1000 + 1000 * Table.level } вместо Table.level использовать не константу, а переменную (типа self.level). Простите, что так изъясняюсь, но лучше формулировке не придумал
  21. It doesn't add new cars simple change other one
×
×
  • Create New...