Jump to content

Spakye

Members
  • Posts

    108
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Spakye

  1. Hello, you can detect when a player is leaving a colshape with onColShapeLeave event. You can also get all players with getElementsByType("player") and then loop through the table and check if the players are in the colshape with isElementWithinColShape
  2. Spakye

    question

    everything is in the resource's wiki, it works similar to gui. Just go down the list of elements you would like to create, pick what you like and check exemples
  3. Spakye

    question

    Hello, with dx functions like dxDrawText. You can also take a look at DGS resource https://wiki.multitheftauto.com/wiki/Resource:DGS
  4. Hello, you can use string.sub(theString, 2) to remove first letter and string.lower(theString) to remove uppercase
  5. Spakye

    [HELP]

    if ( yourMoney >= 100)
  6. Check this page and read the first sentences, it explains pretty much how to do what you want You might need to use getCursorPosition aswell https://wiki.multitheftauto.com/wiki/GetWorldFromScreenPosition
  7. Hello, if its a gui element you can use onClientMouseMove onClientMouseEnter and onClientMouseLeave depending what you try to achieve
  8. Spakye

    Recoil system

    As i said, it does what you want.
  9. Spakye

    Recoil system

    Mate just start the game and try this it does what you want. It does need more work to make it look nice though the cam rotation is just here to fix the camera going a little bit to the right because im lazy to do some math to find precise positions.
  10. Spakye

    Recoil system

    local coef = 0.01 function test(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement, startX, startY, startZ) if source ~= localPlayer then return end setCameraTarget(hitX, hitY, hitZ + coef) local rot = 360- getPedCameraRotation(localPlayer) setPedCameraRotation ( localPlayer, rot + 0.5 ) end addEventHandler("onClientPlayerWeaponFire", root, test) Try this, its not neat, there is some math to do but its a start
  11. Spakye

    Recoil system

    setCameraTarget doesnt allow you to move it up sadly. Did you see this topic?
  12. Spakye

    Recoil system

    Hello, try to replace setCameraTarget(...) with setCameraMatrix( x, y, z, lx, ly, lz + coef ) If it doesnt work you can also try something with get and setCursorPosition
  13. Spakye

    Mta DayZ

    Hello, would be nice if you can share the error message and bit more code so we can understand what is the problem.
  14. Hello, this should work setInteriorSoundsEnabled
  15. Hello, the error comes from aclGetGroup( value.aclGroup ) as it doesnt find the acl group and return false. whats in the groups table you are looping through ? i guess acl groups but we cant see how you set the var, maybe the problem comes from that
  16. Spakye

    GUI Click

    Hello, try to add false to your event handler addEventHandler ( "onClientGUIClick", theButton, theFunction, false )
  17. Hello, do you mean TeamSpeak or Discord ? this resource is meant for TS. If you want to do something similar with discord you can take a look at this : and this :
  18. Hello, unless im missing something i think the issue is the syntax, you wrotte instead of getElementsWithinColShape( colshape, "object" )
  19. Edit: i read wrong, don't mind me
  20. Hello, i think the way to do it is to freeze the ped and then set position every x milliseconds or even every frame but there might be a better way. you can check superman resource to see how its done. https://community.multitheftauto.com/index.php?p=resources&s=details&id=220
  21. Spakye

    Weapon Zoom

    Im afraid it won't work, it says : Note: setCameraFieldOfView does not affect the FOV for the following camera modes: 1) Player aiming 2) Vehicle front bumper camera 3) Fixed camera. I hope it will though!
  22. Spakye

    Weapon Zoom

    Ah my bad, sorry i dont know then. Maybe with flags as you said but none seems to match what you want ?
  23. Spakye

    Weapon Zoom

    Hello, a while ago i was trying to create a binocular script and i had to do something a bit similar. I couldn't find a way to do exactly what i wanted but it worked like that : function sniperAutoZoom() local weapon = getPedWeapon(localPlayer) if weapon == 34 then setPedControlState(localPlayer, "zoom_out", true ) else setPedControlState (localPlayer, "zoom_out", false ) end end addEventHandler("onClientPlayerWeaponSwitch", localPlayer, sniperAutoZoom) For some reason "zoom_in" actually zoom out, and "zoom_out" zoom in for me, maybe my controls are wrong idk. This solution is not great cause the zoom is not instant and you can't zoom out if needed. You could maybe add a timer so it only zoom in for a little while and then allow players to zoom out if needed.
  24. Spakye

    help PlaySound

    Hello, use math.random(1, 12) on server side and pass the result to all clients through your event. You can then play then use playSound(tablerand[result])
  25. Hello, try to start defaultstats resource it should do the trick
×
×
  • Create New...