Jump to content

IIYAMA

Moderators
  • Posts

    6,097
  • Joined

  • Last visited

  • Days Won

    218

Everything posted by IIYAMA

  1. Well we are now talking about 2 systems. A server. A mta (client). You can't link them, they are operating apart. You must keep in mind that a server(serverside) is very far away from you(clientside). Example: You are in Spain and the server is in Germany. But you can communicate: https://wiki.multitheftauto.com/wiki/TriggerServerEvent https://wiki.multitheftauto.com/wiki/TriggerClientEvent https://wiki.multitheftauto.com/wiki/SetElementData Most serverside functions are also sharing information directly. But if you want to get a serverside team at clientside. You can use this clientside: https://wiki.multitheftauto.com/wiki/GetTeamFromName or trigger it.
  2. @ Tails. input mode only works for the gui's created by the same script.
  3. create a new file and use that as a client file. In the xml you can define what your files are going to be: https://wiki.multitheftauto.com/wiki/Meta.xml If you don't define, it will be serverside. and don't define as shared, because that is only for code which is only useful for utility functions.
  4. https://wiki.multitheftauto.com/wiki/GuiSetInputMode
  5. Well all you need is white 4 corners.... (white because then you can set up your own colour) Perfect rounded corners, it only cost a lot loop power to generate it. (one time of course)
  6. if getPedWeapon ( player,slot ) then
  7. Most of the time 70% of the slots are empty. So the weapon won't be changed. (because you don't have a weapon in that slot)
  8. Nee, slothbot is echt gemaakt voor deathmatch. Maar hier kan je dat soort scripts wel krijgen: http://crystalmv.net84.net/pages/scripts.php
  9. Slothbot is bedoeld om bots iets te laten doen. (lopen/shieten/springen) Niet om tegen te praten lol Je kan dan beter gewoon een ped neerzetten, desnoods met de map editor.
  10. IIYAMA

    Lower Windows

    You can try those new functions I have never seen before: https://wiki.multitheftauto.com/wiki/Se ... ntPosition https://wiki.multitheftauto.com/wiki/Se ... entVisible
  11. Can you make a screenshot?
  12. Try to change it to that: setPedCameraRotation(myPed, -findRotation(math.cos(_i)*(radius-width)+posX, math.sin(_i)*(radius-width)+posY, -1375.30627, -234.72827)) Always remember that the ped rotation is the opposite of the camera rotation. So that's why I did: -
  13. setPedRotation doesn't work well when controlstate "forwards" is on. setPedCameraRotation <
  14. Well if you want that, you have to use trigonometric functions/math to create points around your main point. To create a kind of path or a dynamic path. Except I am not going to burn my fingers on that.
  15. myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) setPedControlState(myPed,"forwards",true) local rotationSpeed = 45 function pedRotate() local rx,ry,rz = getElementRotation(myPed) --setElementPosition (myPed, -1375.30627, -234.72827, 14.14844, false) rz = rz+rotationSpeed if rz <= 360 then setPedCameraRotation (myPed,-rz) else setPedCameraRotation (myPed,0) end end addEventHandler( "onClientResourceStart",resourceRoot, function() setTimer(pedRotate,500,0) end) Works perfectly.
  16. IIYAMA

    Check Water

    https://wiki.multitheftauto.com/wiki/GetPedBonePosition https://wiki.multitheftauto.com/wiki/Te ... ainstWater good luck.
  17. I will test it myself over 6 hours. Also use: resourceRoot instead of root or getRootElement() (which I also forgot to change) I was that evening not very clear in my head....
  18. The "while" loops are very laggy when you don't use them careful. The loop at line 48 will never be broken?
  19. AFAIK you also can see that I wrote a wrong variable. Always check people their code, before testing it. Also check your debugscript(/debugscript 3) then you would also know why it isn't working. Try this: myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) setPedControlState(myPed,"forwards",true) local rotationSpeed = 15 function pedRotate() local rx,ry,rz = getElementRotation(myPed) --setElementPosition (myPed, -1375.30627, -234.72827, 14.14844, false) rz = rz+rotationSpeed if rz <= 360 then setPedCameraRotation (myPed,-rz) else setPedCameraRotation (myPed,0) end end addEventHandler( "onClientResourceStart", root, function() setTimer(pedRotate,500,0) end)
  20. Next time explain better. I am still not sure what you mean. myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) setPedControlState(myPed,"forwards",true) local rotationSpeed = 0.04 function pedRotate() local rx,ry,rz = getElementRotation(myPed) --setElementPosition (myPed, -1375.30627, -234.72827, 14.14844, false) rz = rz+rotationSpeed if rz <= 360 then setPedCameraRotation (ped,-rz) else setPedCameraRotation (ped,0) end end addEventHandler( "onClientResourceStart", root, function() addEventHandler("onClientRender",root,pedRotate) end)
  21. myPed = createPed(23,-1375.30627, -234.72827, 14.14844) setElementRotation(myPed,0,0,0) local k = 0 function pedRotate() if k+15 <= 360 then --setElementVelocity(myPed,1,1,1) k = k + 15 else k = 0 end local rx,ry,rz = getElementRotation(myPed) setElementRotation(myPed,rx,ry,k) end addEventHandler( "onClientResourceStart", getRootElement(), function() setTimer(pedRotate,500,0) end)
  22. I am not sure what your gui looks like, but if moving the gui is a problem. Then you have to calculate the offset. https://wiki.multitheftauto.com/wiki/GuiGetPosition
  23. Edited(see last post)
×
×
  • Create New...