Jump to content

SDK

Members
  • Posts

    635
  • Joined

  • Last visited

Everything posted by SDK

  1. Vehicles also trigger onColShapeHit, check the type of thePlayer with getElementType(thePlayer) == 'player'.
  2. SDK

    Hey Guys please read

    "Program Files (x86)" => "Program Files" ...
  3. SDK

    Hey Guys please read

    That's meta.xml, you need to fix acl.xml. C:\Program Files (x86)\MTA San Andreas 1.1\server\mods\deathmatch\acl.xml
  4. He does it using the new shaders. https://community.multitheftauto.com/index.php?p= ... ls&id=2730
  5. function oneSpace(str) return not ( not string.find(str, "%s") or string.find(str, "%s.*%s") ) end oneSpace("abcd efg") --true oneSpace("") --false oneSpace(" ") --true oneSpace(" ") --false oneSpace("abcd efg hij") --false oneSpace("abcdeft") --false oneSpace("Como vai?") --true oneSpace("Test test test test") --false
  6. This is one way speed = 0.5 _,_, rotz = getElementRotation(vehicle) rotz = math.rad(rotz) vel_x = speed * math.sin(rotz) * -1 vel_y = speed * math.cos(rotz) setElementVelocity(vehicle, vel_x, vel_y, 0)
  7. Take a look at the error() function then: http://www.lua.org/manual/5.1/manual.html#pdf-error function test1(i) test2(i) end function test2(i) error("Don't use Strings!", i) end test1(1) -- Error: [string "function test1(i)..."] Don't use Strings! test1(2) -- Error: [string "function test1(i)..."] Don't use Strings!
  8. This should be in the scripting forum. Anyway, you can add a check and then use your own error output in debug. Example: function MySQL_Save ( strings ) if not strings then outputDebugString("MySQL_Save: no argument", 3) return false elseif type(strings) ~= 'string' then outputDebugString("MySQL_Save: arg #1 not a string", 3) return false elseif #strings < 1 then outputDebugString("MySQL_Save: invalid string", 3) return false end return mysql_escape_string ( Datenbank, strings ) end You can find an advanced function for argument checking here: https://wiki.multitheftauto.com/wiki/Check
  9. Make sure you use power of 2 dimensions, it's a pretty common problem.
  10. SDK

    Register denied

    Is this all the (serverside) code? Cause I can't see addAccount anywhere. Also keep in mind that you don't need to add the password for getAccount to check if an account exists (check the wiki).
  11. It's fixed already, http://code.google.com/p/mtasa-blue/sou ... ail?r=3091
  12. That's a bit of a mess, with all the ...'s. I think you need to move the "test for data from server" output to the getdatafromserverdrift function. Server/client events don't work immediately.
  13. SDK

    NEED SOME HELP!!!

    If you're on a server with driveby enabled, you need to right click to aim iirc.
  14. Check your resources for double folders/zips
  15. Or if you have access to the server console, type "addaccount We We" https://wiki.multitheftauto.com/wiki/Ser ... nistrators
  16. SDK

    progress

    I typed exactly what you need to do, did you make this code yourself?
  17. When you create the objects, use setElementParent ( object, vehicle ), this will make the vehicle the parent of the objects. destroyElement will also destroy all children of the element you're destroying.
  18. SDK

    progress

    Change the 1000 (=1000ms=1s) interval to something smaller, 50 or 100
  19. What do you mean not spawn, did you add spawnPlayer() ?
  20. So, we can assume the data is correctly in the database (you checked with sqlitebrowser/functions/...) Do a for key, value in pairs(userTable) do loop, output the key and the value, and you'll see what you did wrong.
  21. SDK

    Music in area

    with some edits, yes
  22. SDK

    progress

    Try this, quickly made and not tested function createProgressBar(player, time) local x, y = guiGetScreenSize() progress = guiCreateProgressBar(x/2, y/3, 300, 30, false) setTimer(function (starttick, time) local prog = (getTickCount() - starttick)/time * 100 if prog < 100 then guiProgressBarSetProgress(progress, prog ) else destroyElement(progress) end end, 1000, time/1000, getTickCount(), time) end
  23. bindKey('f2', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() So, what do these functions do? My guess is that you tried to modify the freeroam resource.
×
×
  • Create New...