Jump to content

IIYAMA

Moderators
  • Posts

    6,062
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. I have one tab called "codering", for me it is not encoding(dutch version but it should not really matter..). In that tab there is UTF-8 without BOM converting. When I set him to "UTF-8 without BOM converting", nothing happend, the script does not have any errors. Do you have some plugins or?
  2. lol, I think your question isn't correct, Mta can do everything that samp can. Only sometimes you have to make it your self. "Yes but how to do with button on the wall?" hmm? You mean a button to click (3d button) so something happens? You mean this: https://wiki.multitheftauto.com/wiki/OnClientClick wikimta onclientclick Move object: https://wiki.multitheftauto.com/wiki/MoveObject
  3. IIYAMA

    Central Time

    See 3ήẰÐ his script, that's shows your own time. (not my lines, just for you to know and not stolen, from the community*) But: local realtime=string.format("%02d-%02d", getRealTime().hour, getRealTime().minute) outputChatBox(string.char(string.byte(realtime, i,i)))
  4. IIYAMA

    Central Time

    server function getthetime(player) local hour, minutes = getTime() local Thetimenow[1] = hour, minutes triggerClientEvent ( "store_the_time", getRootElement(), Thetimenow ) end addCommandHandler("whatisthetime", getthetime) --or local local Thetimenow[1] = getTime() client local hour, minutes = 0,0 addEvent( "store_the_time", true ) addEventHandler( "store_the_time", getRootElement(), ready_to_store ) function ready_to_store (Thetimenow) hour, minutes = Thetimenow[1] end GetTime or function getthetime(player) triggerClientEvent ( "store_the_time", getRootElement(), getTime() ) end addCommandHandler("whatisthetime", getthetime) local hour, minutes = 0,0 addEvent( "store_the_time", true ) addEventHandler( "store_the_time", getRootElement(), ready_to_store ) function ready_to_store (hour2, minutes2) hour, minutes = hour2, minutes2 end your question is incorrect, or I don't know... I don't get it... lol 3ήẰÐ was first, his sample is better.
  5. Nope, Because change .txds is like adding mods to objects. TXD isn't generated by a onClientRender function, but will replace it's object colours. But the directX functions give use hope, to do the impossible. Write "dx" in wiki mta and you will find other directx functions. https://wiki.multitheftauto.com/wiki/DxCreateShader
  6. You have a sample of loadstring? local file = fileOpen( ":resource/file.ext" ); if ( file ) then loadstring( fileRead( file, fileGetSize( file ) ) )(); end fileClose( file ); and will it matter if you are running a windows or linux server?
  7. 3ɑsн8 ɑʟsнɾq, is a very good helper at the forum. When somebody got a problem he is always tries to help them, if they understand a little lua. He helped me circa 3/5 times, successful. I vote for 3ɑsн8 ɑʟsнɾq, (if my vote count)
  8. Je hebt te veel .lua gescript en je gaat aan je leraar hulp vragen omdat je er niet uit komt.
  9. Check when you start a map, not a gamemode or script. https://wiki.multitheftauto.com/wiki/OnResourceStart I need to use the "type" written in the meta* function resourcecheck ( res ) end addEventHandler ( "onResourceStart", getRootElement(), resourcecheck ) Must I use the resource "mapmanager" to do that?
  10. https://wiki.multitheftauto.com/wiki/SetLowLODElement This works 100% for me. Just set the elements you use at 300* or all objects you even can think off. Note:(client) for i = 1, 10000 do -- put all objects between 1 t/m 10000 in a loop engineSetModelLODDistance ( i, 300 ) --force them to load. end Don't work for ped's, cars and I think also not so good for interiors.
  11. Just download another version..... There are many versions.
  12. yes, but it is still wasted of bandwidth. It is better to store it in a table. and the strange thing aboth all that the element data never will be set in the script except the element data already exist.
  13. How can you make data only be able to cross between 2 of the 3 scripts. local and non local If you have 3 server.lua scripts and you want only 2 of the 3 able to use the data, is that possible?
  14. Bandwidth wastage or bug fix? This is From the stealth source. (server) local objectlist = getElementsByType ( "object" ) for index, object in ipairs(objectlist) do if ( getElementData ( object, "renew" ) == "1" ) then--wtf? local x,y,z = getElementPosition( object ) local rx,ry,rz = getObjectRotation ( object ) local obid = getElementModel ( object ) destroyElement(object) local newobject = createObject ( obid, x, y, z, rx, ry, rz ) setElementData ( newobject, "renew", "1" )--wtf? end end
  15. Ok thank you again. It was very clear.
  16. ok, thank you But when should you use a local function, when the data inside stay's global? Does this really matter in mta lua? (stopping the line) ";"
  17. I have 2 client scripts. Here I set the value in a local function. exits()--trigger local function exits() myValue = true end But the value will be active in other client scripts. Only when I make the value local. local myValue = true It will stay inside the client file. You can try this sample: script1 local function exits() myValue = true end addEventHandler ( "onClientResourceStart", resourceRoot, exits) script2 function checkexit() outputChatBox("read") if myValue then outputChatBox("exit the script") end end addCommandHandler ( "read", checkexit )
  18. I am trying to use local functions but the value still exit the script. Like as sample: script 1 exits()--trigger local function exits() myValue = true end script2 function checkexit() if myValue then outputChatBox("exit the script") end end addCommandHandler ( "read", checkexit ) ------- It will output for me: "exit the script" What I am doing wrong? Does a local function do something else? This will solve it, but it isn't a local function. local myValue = true-- out of the function exits()--trigger local function exits() myValue = true end
  19. /debugscript 3 take a look in the meta.xml and .map if everything is still there.
  20. and what happend when you change player1 to player2?
×
×
  • Create New...