Jump to content

draobrehtom

Members
  • Posts

    98
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by draobrehtom

  1. Every time if you get error in scripting, you need to tell us, which error are you have or in which statements you are getting this error. Because I even don't know have you a logic error or something else.
  2. I'm sorry for this, I was wrong: ` Try this, It was edited: addEventHandler( "onPlayerLogin", root, function( ) local account = getPlayerAccount( source ) if ( account ) then if ( not isGuestAccount( account ) ) then if ( not getAccountData( account, "FirstTime" ) ) then outputChatBox("You're playing for the first time!", source, 0, 255, 0) startResource ( skinnew ) setElementPosition ( source, 1254.50049, -790.40015, 92.03018 ) setAccountData(account, "FirstTime", true) else outputChatBox("This is not the first time for you!", source, 255, 0, 0) end end end end )
  3. It is because you have already account data on the guest account in database mta.
  4. Firstly, get the resource from name by getResourceFromName ( resourceName )
  5. Test this example with added aclrequest to meta.xml and give us results, please: function startTheResource ( thePlayer, command, resourceName ) if ( resourceName ) then -- Check if they specified a resource name local resource = getResourceFromName ( resourceName ) -- Get the resource local start = startResource ( resource ) -- Start the resource if ( start ) then -- If it was successfully started... outputChatBox ( resourceName .. " was started successfully.", thePlayer, 255, 0, 0 ) else -- If it wasn't successfully started... outputChatBox ( "This resource doesn't exist.", thePlayer, 255, 0, 0 ) end else -- If they didn't put a resource name... outputChatBox ( "Please specify a resource to start.", thePlayer, 255, 0, 0 ) end end addCommandHandler ( "resource-start", startTheResource ) -- Make it trigger when somebody types "/resource-start"
  6. It's for a security reason and more easily structure of acl (grouping rights and types of the rights, you need to read about it on the Wiki - acl.xml article).
  7. But you need to log in with Console permission too, I think.
  8. For a starting resource from another resource, you need to set a permission for you resource "startResource" "true" in acl.xml.
  9. How to compute Velocity vector of Vehicle turret relative to Global World? I did some calculations and this is what I have been able to reach: local lrotX, lrotY = getVehicleTurretPosition(occupiedVehicle) -- Compute local 3D vector from bearing and elevation math local tVx,tVy,tVz = math.cos(lrotX) * math.cos(lrotY), math.sin(lrotX) * math.cos(lrotY), math.sin(lrotY) Maybe I need to calculate the difference of rotation angles turret and my vehicle, and then to compute Vector by formula above?
  10. Как мне получить вектор направления башни (S.W.A.T. автомобиль) относительно глобальной системы координат, для установки вектора velocity в createProjectile? Единственное, что на данный момент мне удалось сделать, это высчитать вектор башни, относительно самого транспорта. Я это вижу, как вычисление разницы вектора velocity автомобиля и вектора башни, однако не совсем уверен, что это так и как правильно это просчитать (проводил некоторые тесты с getElementVelocity автомобиля). local lrotX, lrotY = getVehicleTurretPosition(occupiedVehicle) -- Compute 3D vector from bearing and elevation math local tVx,tVy,tVz = math.cos(lrotX) * math.cos(lrotY), math.sin(lrotX) * math.cos(lrotY), math.sin(lrotY)
  11. I don't know another way to do this, but you maybe can create ped localy and synchronize it with a world I think (or it will be gonna automatically).
  12. I don't think so. I know a guy who did that, and he exactly did this without CEF.
  13. https://community.multitheftauto.com/index.php?p=resources&s=details&id=12905
  14. Hi there. I interesting the one of important question. When I want to get getPedVehicleOccupied, what' will be more better with a performance side? To check every frame with onClientRender event if player are in a vehicle (getPedVehicleOccupied)? Or set events like a onClientVehicleEnter/Exit, onClientResourceStart etc. and check getPedVehicleOccupied only in those events?
  15. Тоже интересует этот вопрос, плюс ещё: Каким образом более правильно (со стороны производительности) можно отследить, находится ли игрок в автомобиле (например 402)? Есть два варианта: * Короткий и простой вариант. Через onClientRender постоянно проверять на 402 == getElementModel(getPedOccupiedVehicle(localPlayer)), но здесь каждый каждр будет вызываться функция проверки. Не скажется ли это на производительности? * Либо рассмтреть все случаи (раставить события при старте ресурса, при входе/выходе из автомобиля, смерти, варпе в авто и т.д.), когда игрок будет в автобиле присутствовать/отсутствовать и от этого отталкиваться?
  16. You can create missile with https://wiki.multitheftauto.com/wiki/CreateProjectile Get the angles of turret - https://wiki.multitheftauto.com/wiki/GetVehicleTurretPosition
  17. Попробуй установить includeWorldModelInformation на true.
  18. After 6 years this bug is not fixed.
  19. You have a wrong name variable (killer1222) in function fixVehicle and you didnt get vehicle player. Try: fixVehicle(getPedOccupiedVehicle(getElementData(source, 'killer1222')))
  20. Fiction-^, thank you, really nice to hear that. I'll try to update script, thank you for you commit.
  21. Thank you, LeSilver. Of course. you can, for now - it's a public resource.
  22. My first release login panel form: * Based on HTML 5 * Background Music, Video (with scripting functions, controllers). Some examples to interact with Lua there in code or MTA wiki, as you wish. https://community.multitheftauto.com/in ... s&id=12905
  23. Wątpe że to można zrobić w latwy sposób. Ja bym to zrobił za pomocą animacji i attach. Lub sprobować skasować kolizje i widoczność u pojazda i zrobić attach na istniejący samochod. Może uda się, sprobój.
  24. Na ile pamiętam, to robi zasob standartowy MTA - freecam. Znajduje się w kategoji "[editor]" w folderze twojego serwera.
  25. Może pomogą ci te strone: https://wiki.multitheftauto.com/wiki/En ... rldTexture https://wiki.multitheftauto.com/wiki/Sh ... t_resource https://wiki.multitheftauto.com/wiki/Shader_examples
×
×
  • Create New...