Jump to content

Patrick

Moderators
  • Posts

    1,143
  • Joined

  • Last visited

  • Days Won

    42

Everything posted by Patrick

  1. The repository is no longer available. I'm gonna close this thread to avoid future inconveniences/bumps. @yourpalenes Please send me a private message, if you want to reopen it, thanks.
  2. I don't think that's in MTA.
  3. Only way is setPedAnimation
  4. Probably because you store the phonenumber as Integer in database, and you can't start a number with 0. (so 011 equals to 11) Change phonenumber's type to VARCHAR in database.
  5. Hi, it's possible with dxCreateScreenSource and dxUpdateScreenSource. Check out this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=2870
  6. Good to hear, here are some excellent resources to learn the basics of Lua scripting: - https://wiki.multitheftauto.com/wiki/Main_Page - https://wiki.multitheftauto.com/wiki/Scripting_Introduction - https://www.lua.org/manual/5.1/ - https://wiki.multitheftauto.com/wiki/Category:Tutorials - https://forum.multitheftauto.com/topic/64228-the-ultimate-lua-tutorial/ - https://forum.multitheftauto.com/topic/34453-manuals - https://forum.multitheftauto.com/topic/121619-lua-for-absolute-beginners - https://forum.multitheftauto.com/topic/95654-tut-debugging/ - https://forum.multitheftauto.com/topic/114541-tut-events/ - https://forum.multitheftauto.com/topic/117472-tut-scaling-dx/
  7. local number = "076" .. math.random(1000000, 9999999)
  8. Possible with masking, here is an example: https://wiki.multitheftauto.com/wiki/Shader_examples#Hud_mask
  9. I assume the weapon is an object, so you need to set object's alpha to 0 when player aiming.
  10. -- SHARED function buildQuery(table_name, data, where) local data_str = "" local where_str = "" for k, v in pairs(data) do data_str = data_str .. (data_str == "" and "" or ", ") .. ('`%s`="%s"'):format(tostring(k), tostring(v)) end for k, v in pairs(where) do where_str = where_str .. (where_str == "" and "" or " and ") .. ('`%s`="%s"'):format(tostring(k), tostring(v)) end return "UPDATE `"..table_name.."` SET "..data_str.." WHERE "..where_str end local queryString = buildQuery('table_name', { name = 'New Name' }, { name = 'Old Name' }) print(queryString) -- UPDATE `table_name` SET `name`="New Name" WHERE `name`="Old Name"
  11. @Lovekillin Hi. You can find a really simple How to use in the description?
  12. Wrong language and section, moved to Spanish.
  13. Wrong language, moved to Spanish section.
  14. You already know what is the model ID, then what is the question?
  15. The sort answer: --1st way >> table {} setElementData(player,"data",{x,y,z}) and --2nd way >> data[i] setElementData(player,"data",{x,y,z}) local data = getElementData(player,"data") local x,y,z = data[1],data[2],data[3] You can test all of them easily for yourself: -- CLIENT local startTick = getTickCount() for i = 1, 100000 do -- execute the code 100000 times setElementData(localPlayer,"data",{0,0,0}) local data = getElementData(localPlayer,"data") local x,y,z = data[1],data[2],data[3] end local endTick = getTickCount() print("Execution time:", endTick - startTick .. " ms") And you should check this:
  16. Welcome, here is the resource btw, if anyone needs it: snipercrosshair.zip
  17. This is the bank in Fort Carson, isn't it? https://dev.prineside.com/en/gtasa_samp_model_id/model/16070-des_stwnhotel1/ (left building)
  18. Hi! You can replace the texture with engineApplyShaderToWorldTexture. -- CLIENT SIDE local raw_shader = [[ texture TEXTURE; technique TexReplace { pass P0 { Texture[0] = TEXTURE; } } ]] addEventHandler("onClientResourceStart", root, function() local shader = dxCreateShader(raw_shader) local texture = dxCreateTexture("crosshair.png") dxSetShaderValue(shader, "TEXTURE", texture) engineApplyShaderToWorldTexture(shader, "snipercrosshair") end) Crosshair image (crosshair.png): https://i.imgur.com/BzfPcsO.png
  19. The main problem is this: WARNING: Access denied @ 'addAccount' You need to give permission to the resource to create accounts. 1) Stop the server. 2) Open ACL.xml 3) Find Admin group. ("<group name="Admin"> ...") 4) Add your resource to this group. (Add this line before </group> close tag: "<object name="resource.S"></object>") (if the resource's name is S) <group name="Admin"> <acl name="Moderator"></acl> <acl name="SuperModerator"></acl> <acl name="Admin"></acl> <acl name="RPC"></acl> <object name="resource.S"></object> </group>
  20. Yeah, I'm gonna fix it later, and upload it. ?
×
×
  • Create New...