-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
75: WEAPONTYPE_MICRO_UZI_SKILL Tec9 and uzi 79: WEAPONTYPE_SNIPERRIFLE_SKILL Rifle and sniperrifle
-
I am expecting a lot of naked sexy female skins, inside fast cars. Or just a mode where nothing works as you would expected and you will be punished for everything you do. (my imaginations are running wild )
-
Why don't you start with learning how to create an infinity timer? Just create it for fun and let it say something in the chat! https://wiki.multitheftauto.com/wiki/SetTimer https://wiki.multitheftauto.com/wiki/OutputChatBox
-
Loops are not meant to check if something has changed, they will keep running and delay all other processes until the system stops it. Loops are for processing multiple pieces of data during one action. How about you use a timer instead? (if serverside) https://wiki.multitheftauto.com/wiki/SetTimer Or 'onClientRender' (if clientside) https://wiki.multitheftauto.com/wiki/OnClientRender
-
Hmm really strange haha. My bad, I really though you used it. (I never said you used the code, but the tutorial) I apologies for this misunderstanding It is sad to hear that your project ended up badly. Roleplay servers do indeed take a lot of time and it is hard to do it alone. Lol 'kutmode' sounds very Dutch haha, even though you are registered as the UK.
-
I remember it was 'possible' with minigun, except you would crash after aiming your weapon. So they probably disabled it for that reason.
-
Sounds to me you forgot my tutorial in your credits. As I said in the tutorial, you must add credits if you use my tutorial for your code. I left a watermark, that's how I know you used it. So add credits and re-upload it, thank you! ?
-
Hackers not really common, true. That's why I mentioned backdoors as well, which are more common. (Especially when there are compiled community scripts running on the server)
-
There are two reasons why people (like me) do compile + encrypt script. - Security for hackers and backdoors (which unfortunately do exist) - Performance (compiled scripts are optimised) So pls, do not criticize people for doing the right thing. Just fill in your server version. I guess your server is 1.5.3? (Using the server version gives less problems) <min_mta_version client="1.5.3" server="1.5.3" />
-
If a cheater is able to set elementdata clientside. A lot of servers will be breached. So the answer to that is yes/no. 90% of the cheating I have seen at scripting level(we are in the scripting section) is done by corrupted staff. The resource runcode and even admin(execute command) itself do have scripting based inputs, which can easy manipulate elementData. So, prevent cheating is a better way of doing instead of writing an complex anti cheat. Use tables instead of elementdata for important data. (like money / stats) Always check if players are logged in as admin, while execute an action that should be available for admins only. Do never give strange players admin / other ranks, if you haven't edited your acl properly. They will be able to do everything they want if they are smart enough. (Even stealing your resources) Do not upload runcode on your public server. (remove it) Other cheats (flying/aimbot/ etc.)? You noticed cheating while your mta server is up-to-date? You might consider an anti cheat, if you are 100% sure it isn't the result of a corrupted staff-member.
-
local cameraX, cameraY, cameraZ = getCameraMatrix () for i,v in pairs ( messages ) do local x, y, z = unpack ( v ) if getDistanceBetweenPoints3D (cameraX, cameraY, cameraZ, x, y, z ) < 100 then local sx, sy = getScreenFromWorldPosition ( x, y, z ) if sx then dxDrawText ( i, sx+2, sy+2, sw, sh, tocolor ( 0, 0, 0, 255 ), 2.0, "default-bold" ) dxDrawText ( i, sx, sy, sw, sh, tocolor ( 0, 136, 255, 255 ), 2.0, "default-bold" ) end end end If you also want to scale the text according to the REAL distance, see:
-
local allTeamData = { ["Ghost Mercenaries"] = { spawnpoint = {-176.84535, 996.75055, 23.63281, 180, 287, 0} -- add more data if you want. }, ["Special Military Unit"] = { spawnpoint = {-176.84535, 996.75055, 23.63281, 180, 287, 0} -- add more data if you want. }, ["People's Protection Power"] = { spawnpoint = {-176.84535, 996.75055, 23.63281, 180, 287, 0} -- add more data if you want. } } function onDeath() -- get the player his account local acc = getPlayerAccount(source) -- is played logged in? if not isGuestAccount(acc) then local teamName = getAccountData(acc, "team") local teamData = allTeamData[teamName] -- get the data based on the teamName if teamData then local teamElement = getTeamFromName(teamName) if teamElement then setPlayerTeam(source, teamElement) spawnPlayer (source, unpack(teamData.spawnpoint)) else outputDebugString("<" .. tostring(getPlayerName(source)) .. "> " .. "can't find team") end else outputDebugString("<" .. tostring(getPlayerName(source)) .. "> " .. "team doesn't have teamData!") end else outputDebugString("<" .. tostring(getPlayerName(source)) .. "> " .. "player isn't logged in") end end addEventHandler("onPlayerWasted", root, onDeath)
-
That depends if the variable `green` is available and if the `team` is the team name. You can't save elements inside accountdata, teams are elements. teamName = "green" -- getTeamName ( team theTeam )// https://wiki.multitheftauto.com/wiki/GetTeamName setAccountData(acc, "team", teamName) if getAccountData(acc, "team") == teamName then
-
They are the direction vector of how the line hits on the object. If you hit the object it will return a vector that represents how that part of the object is facing a direction. I am using this function to determine how custom bullet holes are placed on to the objects in the world. If the vector returns (0 x,0 y, 1 z) than the bullet holes would be facing up. Which is most likely the case when you hit the flat ground. (not sure if you have to invert the vector, I haven't used this function for a while)
-
I am not sure if you are asking a simple question or a hard question. It might be handy to add a screenshot. If it is a simple question, than this is one of the answers to it: -- 90 (1/4), 180 (1/2), 270 (3/4), 360 round and round and round... local rotationAdjustments = {xr = 90, yr = -90, zr = 0} function getWallRotation (element) local xr,yr,zr = getElementRotation (element) return rotationAdjustments.xr + xr, rotationAdjustments.yr + yr, rotationAdjustments.zr + zr end Simple add or subtract(minus value) rotations values of the mta rotation. Example: local awesomeRotationX, awesomeRotationY, awesomeRotationZ = getWallRotation(element) As @Jusonex said with processlineOfSign, which will return the exact rotation if used correctly. But you can also play a little bit with it manually. It doesn't have to be pixel perfect!!
-
Yea indeed, that is how it suppose to be haha . Except when it is a value that is variable, that would be annoying to edit later on.
-
Which method is that?
-
Why don't you use both sides? Request clientside > trigger > serveride download > trigger > clientside write file. Else you can better use the downloadFile function. downloadFile
-
What is the errno it returns?
-
outputDebugString("Debug info start: " .. getTickCount()) for i, v in ipairs(resultdata) do inspect ( i ) inspect ( v ) -- https://wiki.multitheftauto.com/wiki/Inspect end ? outputDebugString("Debug info start: " .. getTickCount()) for i, v in ipairs(resultdata) do outputDebugString("type(resultdata) = " .. type(resultdata)) if type(v) == "table" then for j, data in pairs(v) do -- pairs << very important inspect ( j ) inspect ( data ) -- https://wiki.multitheftauto.com/wiki/Inspect end else outputDebugString("V ~= table, but: " .. type(v)) end end I actually forgot how to do it too, haha. Well I do remember that there has to be also a pairs loop in it, because it uses columns as keys.
-
Which side do you think is more logic to have access accounts? Serverside(the server) or clientside(all players)?
-
How does the JSON looks like? How do you split up the JSON? (Note: if you use string keys in JSON, all numeric keys also become strings, which is very annoying) How does the data looks like in the mysql database? Tip: else outputDebugString("Unable to connect to the MySQL server") cancelEvent() -- don't start a resource that doesn't have connection to a mySQL server! Else you get an enormous flow of errors/warnings if the connection fails. end Normally an unique id is the first in the column and the rest of the data comes after that.
-
Here some more improvements: First of all use: local On: ? playerAccount, dataTable, id Shouldn't be able to access from other places! They should be freed from the memory after the code has been executed! Define the target player, you want the data to be send back to: (else all players get this data!) triggerClientEvent(thePlayer, "getGarageCallback", thePlayer, dataTable)
-
local texts = { "Text 1", "Text 2", "Text 3", "Text 4", "Text 5" } local textIndex = 1 setTimer(function () textIndex = textIndex+1 end, 8000, #texts) ----- dxDrawText(texts[textIndex], screenW * 0.3555, screenH * 0.7014, screenW * 0.6414, screenH * 0.8403, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
