Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. Are you just acting/pretending stupid or are you seriously stupid..? He's trying to replace the TXD of a marker.. not create a marker with a command. @OP; can you try to see what the functions are returning? Simply use outputChatBox with tostring to see what the returned values of the functions are. They might not be able to be replaced, some people could use filters to add some GFX. But then again, it's just a normal object. If this doesn't work, you can always try to replace a simple object which will be used no where else, and spawn that on the same location of the marker. As another test, try the replacement of a simple dustbin ( 1337 ) and spawn that on your location after replacing the TXD. If that works but the marker replacement doesn't work, you'll know that you can't replace markers and that you should replace another model, disable the collision and spawn it at the same location as your marker. Don't forget to make your marker's own opacity 0.
  2. respawn the vehicle with all the data since you cant avoid rockets etc..
  3. Jup, there goes my respect for you guys and your only chance of getting support from my side. +1 Viruz, -1 greedy non-learning people begging for an edit.
  4. You are right's. setElementHealth = only set Health car fixVehicle = repaired all Please note that if you hit a pole with a vehicle and someone hits the vehicle with a first afterwards, you're going to repair the entire vehicle. You can also just get the health from the vehicle, get all the panelstates before the player hits the vehicle ( in the same function ) and then reset them back to what they were and set the health back. This might be really tricky but can be done.
  5. As far as my research went, nothing came out. My bad. ^^
  6. tosfera

    Solved

    Oh that's right, unpack is used for a string, not a table. My bad ^^
  7. And you're not from the community, these files haven't been released by them so this'll be another leaked resource. We're not supporting leaked files and therefore you won't receive any help either. Learn Lua yourself, hire a scripter or what ever. Stop using leaked files.
  8. Ohh oops, you're right. the element names shouldn't be string values but actual elements, I'm way too used to my own system.
  9. tosfera

    Solved

    Yes, you just have to save the table in there like so; setElementData ( source, "all", { r, g, b } ); later on you can use; local all = getElementData ( source, "all" ); local r, g, b = unpack ( all );
  10. There is your answer, not even a single has is only numbers. Therefore it should be a text or varchar(45), since the hash from these days isn't longer than that.
  11. What is minHeight and msgHeight? edit; I did make a small typo in the calculations, try something like this; local lineCount = 0; for i, message in pairs(messages) do dxDrawText ( message, 940, minHeight, 1230, ( minHeight + ( msgHeight * dxGetFontHeight ( 1 ) ) + ( lineCount * ( msgHeight * dxGetFontHeight ( 1 ) ) ), tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", true, true, false, false, false) lineCount = lineCount + 1; end Make sure that you change the dxGetFontHeight to the right size, might even replace that with 15 again if you like.
  12. INSERT is when you want to add a new record to your database, the UPDATE is only used to manipulate data. Lets say; A user registers a new account on your server => insert Someone changes their password => update You create a new vehicle and save it in your database => insert The vehicle changed from color => update
  13. --MAXIME Not really, why would you work with files from Maxime? And if you are Maxime, which is not true, you could solve this yourself. I woul go for a nice; these files are either leaked or purchased after leaks from Owl. Can we get a lock on this topic pretty please?
  14. That's quite easy, use a counter variable that keeps track of the index ( I don't really trust the index variable in the pairs itself. ) like so; local lineCount = 0; for i, message in pairs(messages) do dxDrawText(message, 940, minHeight, 1230, (minHeight+(msgHeight*15)) + ( lineCount * ( msgHeight * msgHeight ) ), tocolor(255, 255, 255, 255), 0.60, "bankgothic", "left", "top", true, true, false, false, false) lineCount = lineCount + 1; end If you do however trust the "i" variable, you can just change the lineCount * ( ... to i * ( ...
  15. This didn't work Really obvious that this didn't work, if you want to call the button as an index, you need to transform the table form a value based to an key=>value pair. You'll have to make it like; table = { [ "a" ] = true, [ "b" ] = true }; Once you've done that, you can call it like; table [ button ] Now, with that typing cancelled.. you're putting text in the box yourself, right? So what's wrong with the typing being cancelled? Are you still using other inputs somewhere else?
  16. tosfera

    camera rotation

    also rotate the Z-axis, maybe even the Y-axis too.
  17. You should create a timer that changes these fields. So, let's say that you got a label called; txtPlayerName, you should update that each second in your timer; setTimer ( function() guiSetText ( "txtPlayerName", getPlayerName ( localPlayer ) ); guiSetText ( "txtPlayerPing", getPlayerPing ( localPlayer ) ); end, 1000, 0 );
  18. Calling an exported function requires a : instead of . change local interiors = exports["house-interiors"].getInteriorsList() to local interiors = exports["house-interiors"]:getInteriorsList()
  19. use createVehicle when the user clicked a vehicle or even setElementModel to change the vehicle's model once they select a new one. Then simply add a rotation timer to it that makes it rotate every 50ms.
  20. OH, you said something quite good there. You have to include the entire path to the file in your script. Try to change the path to the file entirely ( "dxgui/dxgui/elements/Font.ttf", why 2x dxgui though? ) like this; local myFont = nil; if ( dxGetStatus().VideoMemoryFreeForMTA > 0 ) then myFont = dxCreateFont ( "dxgui/dxgui/elements/Font.ttf", 2 ); if ( not myFont ) then myFont = dxCreateFont ( "dxgui/dxgui/elements/Font.ttf", 2 ); if ( not myFont ) then myFont = "default"; end end else myFont = "default"; end
  21. What if you add a cancelEvent() after "if pressed then", might work. I've been creating custom inputs too but never had this problem..
  22. Try to skim down which buttons activates that chatbox bind. Press every button once and see which one triggers the error.
×
×
  • Create New...