Jump to content

IIYAMA

Moderators
  • Posts

    6,089
  • Joined

  • Last visited

  • Days Won

    216

Everything posted by IIYAMA

  1. If you can get the Z rotation, you can also get the X and Y rotation. It's just math with sins, cons and tans. sins, cos and tan isn't JUST this math. I know how they work, but I don't know how to use them with this. Since my brain can't merge the ordinary math with 3D math...... Pls give me a sample, if it is just sin cos and tan.
  2. @ CastielRecords I didn't make this topic for things I already know, I asked about getting the X and Y rotation based on finding rotation. Next to that I have lots lua experience with lua, but I don't have with 3D math. Thanks for trying to help me, but I need somebody with high math skills. Is there anybody who can help me with this?
  3. and how do I get the X and Y rotation? Because now I also only have the Z rotation.
  4. I am looking for findRotation math, but one that is also returning X and Y rotation. https://wiki.multitheftauto.com/wiki/FindRotation function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end
  5. is it an image? Save with photoshop as web.
  6. You can try something like this. local myTable = {} for clothesType=0, 17 do local newTable = {} for clothesIndex=0,1000 do -- in case if there are 1001… local clothesTexture,model = getClothesByTypeIndex (clothesType, clothesIndex ) if clothesTexture and model then newTable[clothesIndex]={["clothesTexture"]=clothesTexture,["model"]=model} else break end end myTable[clothesType]= newTable end local clothesTexture = myTable[0][0]["clothesTexture"] local model = myTable[0][0]["model"] It is better to buffer the table first, but I am to lazy to do that.
  7. 1 You only have to defined what you need. But make sure it is there..... http://img43.imageshack.us/img43/2921/e9kp.png and remember, the way you fix/build your script, is more important than having it finished.
  8. As I said in the pm I send you. Everything that is required, must be defined before it can work. Line 10 t/m end function: Not defined. Line 19 t/m end function: Not defined. Line 80 t/m end function: Not defined. ETC. Sample how to define things: First read wiki mta. So for the first function: https://wiki.multitheftauto.com/wiki/AddCommandHandler Then you see: Handler function parameters Choose between client and server parameters.(what kind of script it is) There you find for serverside: (parameters) player playerSource, string commandName, [string arg1, string arg2, ...] Not required to fill in. [string arg1, string arg2, ...] Then we can fill in the script. The parameters are: player playerSource, string commandName, [string arg1, string arg2, ...] function authorIs () -- not filled in function authorIs (thePlayer,commandName) -- filled in. You can name them as you want as long, as you know what they mean. and so........... function authorIs (thePlayer,commandName) -- we just filled in the arguments outputChatBox("Hello,", thePlayer) outputChatBox("This script is made by Viruzgamiing!", thePlayer) outputChatBox("Thanks for using my script...", thePlayer) outputChatBox("Please don't steal any credits!", thePlayer) outputChatBox(" ", thePlayer) outputChatBox("Thanks You!", thePlayer) end addCommandHandler ("info", authorIs )
  9. IIYAMA

    Smooth moving

    Then you better can use TIME instead of counting pixels. https://wiki.multitheftauto.com/wiki/GetTickCount local startTime = 0 local endTime = 0 function renderFunction () local factor = startTime/endTime if factor < 1 then dxDrawText ( factor, 200, 2) else outputChatBox("We stop rendering the factor!") removeEventHandler("onClientRender", root, renderFunction) end end outputChatBox("We start rendering the factor over 5 seconds!!!") setTimer (function () local timeNow = getTickCount () startTime = timeNow endTime = timeNow+10000 -- + 10 seconds addEventHandler("onClientRender", root, renderFunction) end,5000,1) A factor can be used for increasing or de-increase other values. 0.8 = 80% 0.2 = 20% local pixels = 0.2 * 100 outputChatBox(pixels) -- 20 pixels.... Inverse the factor. So you can de-increase the value. local 0.8 = 1 - 0.2
  10. function jobGui -- to function jobGui () and the same with all other custom functions.
  11. Indeed Example; addEventHandler("onText", function text outputChatBox("Hello World!", source) end ) addEvent("onText", true) If i'm right, bcuz i'm a noob scripter too addEvent("onText", true) addEventHandler("onText",root, function () outputChatBox("Hello World!") end) -- or -- function text () outputChatBox("Hello World!") end addEvent("onText", true) addEventHandler("onText",root,text) triggerEvent ("onText",root) @ Misschien kan je even beter naar het voorbeeld kijken. Dit moet je nou wel ongeveer onder de knie hebben.....
  12. true that. addCommandHandler("dimension" function (CMD,arguments) local elements = getElementsByType("object") local dimension = tonumber(arguments) or 0 for i=1,#elements do setElementDimension (elements[i],dimension) end end)
  13. server https://wiki.multitheftauto.com/wiki/OnPlayerLogin https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup https://wiki.multitheftauto.com/wiki/TriggerClientEvent client https://wiki.multitheftauto.com/wiki/PlaySound
  14. Not tested function bountyInfo (player) outputChatBox("write /setbounty to set a bounty", player, 225, 0, 0) local playerSerial = getPlayerSerial(player) if not playerSerial then return false end local timeNow = getTickCount() local playerTickCountInfo = antispam[playerSerial] if not playerTickCountInfo or timeNow > playerTickCountInfo then antispam[playerSerial] = timeNow+300000 return true else outputChatBox( "You can't use /kill multiple Times", player, 225, 0, 0) outputChatBox( "Only once every 5 minutes!", player, 225, 0, 0) return false end end addEventHandler("onPlayerQuit",root, -- very important to clean up the table.......... function () local playerSerial = getPlayerSerial(player) if antispam[playerSerial] then antispam[playerSerial] = nil end end)
  15. You can try to find it with CrystalMV his script.
  16. IIYAMA

    Anti-Cheat Corner

    Mods>Deathmatch>Resources and some servers have a folder called AntiCheat just wondering why they have that when MTA already has it I use anti cheat to kill laggers when they got timed out. Mta doesn't have much things against player lagg to be honest. (except for freeze players) The only thing I can think about is, to prevent corrupted admins being abusing their powers.
  17. If you don't know how an event or function works. There is this page to help you with finding out what the source is, etc. addEventHandler("onElementModelChange", root, function (oldModel,newModel) if newModel == 425 and getElementType(source) == "vehicle" then --425 is the model of the hunter local rotX, rotY, rotZ = getElementRotation(source) -- source is the variable of the vehicle setElementRotation(source,rotX,rotY+10,0) -- always define all required fields. end end)
  18. You can also use: https://wiki.multitheftauto.com/wiki/SetElementRotation For that sample with the bugged car.
  19. Try this(fill in the location) local x,y,z = 0,0,0 -- fill in addEventHandler("onElementModelChange", root, function (oldModel,newModel) if newModel == 425 and getElementType(source) == "vehicle" then --425 = hunter setElementPosition(source,x,y,z) end end)
  20. getElementPosition getElementsByType("player",root,true) processLineOfSight getPedBonePosition setControlState addEventHandler("onClientRender",root,functionVariable) getElementHealth getElementRotation setElementRotation getScreenFromWorldPosition getWorldFromScreenPosition Note you can't use: setPedAimTarget You can try these things, But the aim, I simply don't know.
  21. and restart didn't had any result?
  22. Hoi, Als je rechten op een verkeerde manier beperkt voor moderator, dan beperk je ze ook voor hogere ranken. Probeer te achter halen wat je bij moderator op false heb gezet. Knip dit uit moderator en plak dit in supermoderator, vervolgens zet je wat op "false" staat terug op "true". Het op false zetten van rechten heeft geen zin, omdat als ze niet ingevuld staan toch geen rechten hebben (behalve als ze in de rank daar onder wel rechten hebben). Ranken maken gebruik van elkaars instellingen. user > moderator (moderator gebruikt user) moderator > supermoderator (supermoderator gebruikt moderator) supermoderator > admin (......) Groet, IIYAMA
×
×
  • Create New...