Saml1er

Members
  • Content count

    936
  • Joined

  • Last visited

Community Reputation

10 Decent

3 Followers

About Saml1er

  • Rank
    Hoodsta

Details

  • Gang
    CJ

Recent Profile Visitors

864 profile views
  1. Pubg

    I'm sorry, but it's not possible to achieve what you want without a shader. To create a shader, you must learn HLSL which is a higher-level programming language used specifically for DirectX. You can check: https://wiki.multitheftauto.com/wiki/Element/Shader https://msdn.microsoft.com/en-us/library/windows/desktop/bb509561(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb944006(v=vs.85).aspx https://digitalerr0r.wordpress.com/2009/03/23/xna-shader-programming-tutorial-1-ambient-light/ and some examples from MTA here: https://wiki.multitheftauto.com/wiki/Shader_examples
  2. destroyElement

    Just like IIYAMMA said, you can use tables: local PlayersWithBoxes = {} -- create a table addEvent("GiveThing", true) addEventHandler("GiveThing", getRootElement(), function(localPlayer) local ObjectToAttach = createObject(1518, 0, 0, 0 ) attachElements ( ObjectToAttach, source, 0, 0.5, 0.4 ) setObjectScale ( ObjectToAttach, 0.9 ) PlayersWithBoxes [ source ] = ObjectToAttach -- 'key' is the player and 'value' is the object attached to player end ) addEvent("RemoveThing", true) addEventHandler("RemoveThing", getRootElement(), function(localPlayer) -- I'm guessing that you want to destroy the object attached to "localPlayer" local ObjectAttachedToPlayer = PlayersWithBoxes [ localPlayer ] -- access the object like this if isElement ( ObjectAttachedToPlayer ) then -- check if the object exists destroyElement ( ObjectAttachedToPlayer ) end end )
  3. I believe, you are looking for a web developer, not a "scripter" because they are two different things. The cost totally depends on what you need, if you want a new template for your forum then it's probably going to be expensive ( 50$ - 1000$ ), but if you want some minor modifications to a free template for your forum then it can cost you 50$ - 100$. If you're looking for someone who charges less than that then good luck to you!
  4. WARNING The code below works, but it does not secure your server from hackers. If a hacker manages to modify "isAdmin" variable on client side then he'll be able to fake his admin level access on client side scripts, not on server. If you are just using this to change rendering of HUD or something else that is not important then it's fine, but if you are enabling mods or other admin-level features on server by using isLocalPlayerAdmin function on client side then please check on server side every time before you give access to such features on server instead of client side. Okay, so, add these two files to your script and specify them in meta.xml. In client-side script, I have added a command "amiadmin" which will tell you whether you are an admin or not. You can remove it, if you want. Server side: -- remove these lines starting with local, if you want to use these -- functions in other server-side files local identifyPlayerAsAdminOnClient local isPlayerAdmin local isPlayerLoggedIn local isPlayerInACLGroup addEvent ( "onCheckPlayerInAdminACL", true ) addEventHandler ("onCheckPlayerInAdminACL", root, function ( ) if isPlayerLoggedIn ( client ) and isPlayerAdmin ( client ) then identifyPlayerAsAdminOnClient ( client ) end end ) addEventHandler ( 'onPlayerLogin', root, function () if isPlayerAdmin ( source ) then identifyPlayerAsAdminOnClient ( source ) end end ) function identifyPlayerAsAdminOnClient ( player ) triggerClientEvent ( player, "onIdentifyPlayerAsAdmin", resourceRoot ) end function isPlayerAdmin ( player ) local admingroup = "Admin" if not isPlayerInACLGroup ( player, tostring ( admingroup ) ) then return false end return true end function isPlayerLoggedIn ( player ) return not isGuestAccount ( getPlayerAccount ( player ) ) end function isPlayerInACLGroup ( player, groupName ) local account = getPlayerAccount(player) if not account then return false end local accountName = getAccountName(account) for _,name in ipairs(split(groupName,',')) do local group = aclGetGroup(name) if group then for i,obj in ipairs(aclGroupListObjects(group)) do if obj == 'user.' .. accountName or obj == 'user.*' then return true end end end end return false end Client side: local isAdmin = false addEvent ( "onIdentifyPlayerAsAdmin", true ) addEventHandler ( "onIdentifyPlayerAsAdmin", root, function ( ) isAdmin = true end ) function isLocalPlayerAdmin ( ) return isAdmin end function CheckPlayerInAdminACL ( ) triggerServerEvent ( "onCheckPlayerInAdminACL", resourceRoot ) end addEventHandler("onClientResourceStart", resourceRoot, CheckPlayerInAdminACL ) addCommandHandler ("amiadmin", function ( ) -- You can check whether the player is admin or not, like this: if isLocalPlayerAdmin ( ) then outputChatBox ("Command Response: Yes, you are an admin.", 124, 252, 0, true ) else outputChatBox ("Command Response: No, you are not an admin.", 255, 0, 0, true) end end ) The usage is very simple. You can use isLocalPlayerAdmin function like this: if isLocalPlayerAdmin ( ) then outputChatBox ("Command Response: Yes, you are an admin.", 124, 252, 0, true ) else outputChatBox ("Command Response: No, you are not an admin.", 255, 0, 0, true) end
  5. how to compress dff and txd file

    It is possible to compress dff files, but you'll need to use a Lua library to accomplish that. You can use: https://github.com/brimworks/lua-zip It's basically a Lua module that allows you to compress files in .zip format, I haven't tested it, but I'm making a wild guess that it works. You'll need to load DFF manually by first using the module to compress it, read the compressed file, send it to the client using triggerLatentClientEvent Once the client has received the file, decompress it using the same module, and you'll get a string then use engineLoadDFF ( "yourDFFStringHere" ) to load the file.You save up to 45%. EDIT: Looks like the module is using C code, I guess you can't achieve it without that. I tried looking for some modules written in pure lua, I couldn't find any of them. Try looking by yourself, you might possibly find one.
  6. MTA crashes when joining to the server

    Just like ccw stated in the article: 32-bit version of Windows has only 4 GB of addressable memory. As some memory is occupied by the OS, you are most likely left with 3.5 GB memory for programs. It's very important to upgrade to 64-bit Windows.
  7. Cant change gamemode: gamemode resource could not be started

    Your code in race resource might have errors. Have you modified anything since last successful start?
  8. RenderWare is great

    No, not even close. MTA is still using it.
  9. expected element

    Because it will freeze your server if result needs some time to retrieve. Although, it's not often but still you should check if the result has been successfully retrieved from dbPoll like this: local QueryHandle = dbQuery(database,"SELECT * FROM SpawnCar WHERE owner=?", owner) local PollResult = dbPoll(QueryHandle, 500) -- 0.5 seconds timeout, taking from @StormFighter if ( PollResult == false ) then -- try again or simply log it return false -- exit the function else -- continue the function end
  10. I want to play the game without GTA:SA.

    No, you can't. MTA is just a mod. MTA grabs the data from GTA SA.
  11. netc.dll detected as Virus?

    You can delete the dump file, it will restore on it's own.
  12. What dxSetRenderTarget is used for?

    Render target is just like a paper. You simply draw whatever you want on the paper and finally, render the paper instead of rendering every single piece of 2D element or objects that you want to render. This is will save you expensive CPU cycles and thus give you better FPS. Now, what if you want to update the elements on the render target every 10 seconds? Well, you can destroy the render target and recreate it, draw (rectangles, images or text) on it and render it. Sounds good but what if you want to update the render target every 0.1 second or even faster? then that's where you cannot use render target. You'll need to render the drawing by calling it every 60 seconds or more ( That's how onClientRender works ). Read this: https://msdn.microsoft.com/en-us/library/bb976073(v=xnagamestudio.31).aspx
  13. Need More Info About Making Scripts LUAC

    Lua is an interpreted language. Your scripts cannot be loaded while they are encrypted. MTA must decrypt and then load them but still don't think that it's easy to steal them, it will take some good amount of effort. When you are encrypting ( compiling in MTA terms ) then please choose option 2 from luac.mtasa.com. It's the best way to protect your scripts.
  14. netc.dll detected as Virus?

    Yes! netc.dll has anti-cheat for MTA. It is using some techniques to protect MTA which are also found in viruses and AVs. You can whitelist it without any concern.
  15. How to allow custom gta3.img?

    I think, I got you wrong. Are you trying to let the client to download gta3.img from server and load the models? If that's the case then MTA has lua functions for that but you have to call them for every single model separately. https://wiki.multitheftauto.com/wiki/EngineLoadDFF