Jump to content

IIYAMA

Moderators
  • Posts

    6,063
  • Joined

  • Last visited

  • Days Won

    209

Everything posted by IIYAMA

  1. IIYAMA

    Lower Windows

    if you don't try, you will never know....
  2. Control state: >walk< Make the player move slowly/quietly https://wiki.multitheftauto.com/wiki/Control_names Which is walking and jogging.
  3. addEventHandler("onClientRender",root, function() local allPeds = getElementsByType("ped") for i=1,#allPeds do local ped = allPeds[i] if isElementStreamedIn(ped) then end end end)
  4. function saveCoords(source) local x,y,z = getElementPosition( source ) local stringPos = string.format("%f, %f, %f \n ",x,y,z) local hFile = fileOpen("coords.txt",false) fileSetPos(hFile,fileGetSize ( hFile )) -- I added this. fileWrite(hFile,stringPos) fileClose(hFile) end You can get the filesize, which is the amount of bytes/characters in the document. When you set the read position to the size of the document. It will start writing at the bytes after that. Good luck!
  5. Next to share the texture, you can also share them as pixels. (which you also can save in a file without losing quality)
  6. Didn't you read my post before? You can't compare them because they start at a different time.
  7. The mta server is the system it self. I mentioned the mta server not the machine.
  8. The client tickcount starts when the client starts. The server tickcount starts when the server starts. They never start at the same time, so you can't compare them.
  9. No it can't be less complicated else it doesn't work. This will turn you back to a human: addCommandHandler("human", function(player) local lastObject = animalTable[player] -- request object if lastObject then -- check if there is something is inside. if isElement(lastObject) then -- check if the userdata is still an element. destroyElement(lastObject) -- destroy it. end animalTable[player]= nil -- remove it from the table. end setElementAlpha(player, 255) end)
  10. By using a variable. local handlerOfthisFunction addEventHandler("name", root, function) handlerOfthisFunction = true
  11. Use 1 table. This structure: local animalTable = {[player]=object} local animalTable = {} local animalObjectFinder = {["cow"]=16442,["fish"]=1606} function changeInAnimal (player,cmd) local lastObject = animalTable[player] if lastObject then if isElement(lastObject) then destroyElement(lastObject) end animalTable[player]= nil end local objectID = animalObjectFinder[cmd] if objectID then local x, y, z = getElementPosition(player) local rx, ry, rz = getElementRotation(player) local newObject = createObject( objectID, x, y, z, rx, ry, rz ) if newObject then animalTable[player]= newObject setElementAlpha(player, 0) attachElements(newObject, player) outputChatBox("You are now a" .. cmd .. "!", player, 0, 255, 0) end end end addCommandHandler("cow", changeInAnimal) addCommandHandler("fish", changeInAnimal) addEventHandler("onPlayerQuit",root, function() local lastObject = animalTable[source] if lastObject then if isElement(lastObject) then destroyElement(lastObject) end animalTable[source]= nil end end) If you want to add more animals.(animal names much be match with the animalObjectFinder(table). addCommandHandler("", changeInAnimal) -- the command local animalObjectFinder = {["cow"]=16442,["fish"]=1606,[""]=1606 } -- ,[""]=1606 -- animal name and object id.
  12. @Denny there is also an example at the same page which also can give the matrix at serverside. (Example 3) https://wiki.multitheftauto.com/wiki/GetElementMatrix
  13. IIYAMA

    image rotation

    Or just use:(when you don't understand shaders) https://wiki.multitheftauto.com/wiki/Ge ... enPosition https://wiki.multitheftauto.com/wiki/DxDrawLine3D Good luck
  14. https://wiki.multitheftauto.com/wiki/GetElementMatrix function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] -- Apply transform local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z -- Return the transformed point end -- Get the position of a point 2 units in front of the element: x,y,z = getPositionFromElementOffset(element,0,2,0)
  15. Misschien kan je wat laten zien, ook al ben in niet geïnteresseerd in kopen(ben zelf al een scripter).
  16. 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.
  17. @ Tails. input mode only works for the gui's created by the same script.
  18. 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.
  19. https://wiki.multitheftauto.com/wiki/GuiSetInputMode
  20. 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)
  21. 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)
  22. Nee, slothbot is echt gemaakt voor deathmatch. Maar hier kan je dat soort scripts wel krijgen: http://crystalmv.net84.net/pages/scripts.php
×
×
  • Create New...