Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GTX

  1. You're welcome. Try using http://xnview.com
  2. Wouldn't be setElementCollisionsEnabled easier?
  3. https://wiki.multitheftauto.com/wiki/Resource:Voice - If you find anything useful. getDistanceBetweenPoints3D setPlayerVoiceBroadcastTo https://wiki.multitheftauto.com/wiki/OnPlayerVoiceStart https://wiki.multitheftauto.com/wiki/OnPlayerVoiceStop EDIT: local nearbyPlayers = {} addEventHandler("onPlayerVoiceStart", root, function() local r = 20 local posX, posY, posZ = getElementPosition(source) local chatSphere = createColSphere(posX, posY, posZ, r) nearbyPlayers = getElementsWithinColShape(chatSphere, "player") destroyElement(chatSphere) local empty = exports.voice:getNextEmptyChannel() exports.voice:setPlayerChannel(source, empty) for index, player in ipairs(nearbyPlayers) do exports.voice:setPlayerChannel(player, empty) end end ) addEventHandler("onPlayerVoiceStop", root, function() exports.voice:setPlayerChannel(source) for index, player in ipairs(nearbyPlayers) do exports.voice:setPlayerChannel(player) end nearbyPlayers = {} end )
  4. Well, I did a bit of comparison and just noticed that YUV is bigger than PNG (8 times bigger, at least in my case). I didn't go any further into comparison between those two. Might go deeper some day, but I don't have time.
  5. GTX

    Help

    Press accept. It is from CEF.
  6. GTX

    Help

    Post your code here. No one will add you on Skype just because of some resource. We don't need video or photos.
  7. GTX

    questions MySql

    Wrong section. viewforum.php?f=105 viewforum.php?f=106
  8. GTX

    How i make it ?

    That's what I used (Maybe missed some, but most of them are here) setElementDimension spawnPlayer setElementPosition setElementRotation setElementData getElementData createVehicle createObject xmlLoadFile xmlUnloadFile xmlNodeGetName xmlNodeGetAttribute xmlNodeGetChildren xmlNodeGetValue loadstring pcall setfenv triggerClientEvent triggerServerEvent triggerLatentClientEvent getLatentEventHandlers getLatentEventStatus getNetworkStats setCameraTarget setCameraMatrix setTimer showPlayerHudComponent getResources addEventHandler showChat showCursor setElementFrozen destroyElement
  9. It is MySQL also. Set first argument to "mysql". There are examples on wiki. dbConnect -- Example from wiki: test_db = dbConnect("mysql", "dbname=frank;host=1.2.3.4", "username", "password", "share=1")
  10. Basically, YUV is a file extension for a raster graphics file. They contain bitmap image data stored in YUV format, which splits color across Y, U and V (hence YUV). Therefore, brightness as the Y value and the color as U and V values.
  11. Do not add it inside onClientRender. requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"})
  12. GTX

    Flags

    That's up to you. dxDrawText
  13. GTX

    [Help] Functions

    What's wrong with triggerServerEvent and triggerClientEvent? No, there's no other way.
  14. GTX

    Help

    Post the script here.
  15. I think it's for large ones (Where you get network trouble and you lose connection with server), you can also check getNetworkStats - for small packet losses.
  16. GTX

    help !!

    Stop bumping after 30 minutes. local x,y,z = getElementPosition(localPlayer) local gunCol = createColSphere ( x, y, z, 2 ) local vehicle = getPedOccupiedVehicle (localPlayer) local x2,y2,z2 = getElementPosition(vehicle) local screenW,screenH = guiGetScreenSize() local weapon function attach ( ) local detection = isElementWithinColShape ( localPlayer, gunCol ) if detection then weapon = createWeapon("minigun", x2, y2, z2+2) attachElements ( weapon, vehicle, 0, -1.5, 0.7 ) setWeaponClipAmmo(weapon, 99999) -- setWeaponState(weapon, "firing") setWeaponProperty(weapon, "fire_rotation", 0, -30, 0) --setElementPosition ( localPlayer, x2, y2-1.5, z2+2 ) attachElements ( localPlayer, weapon, 0, 0, 0 ) setElementRotation(weapon,0,0,180) setPedRotation(localPlayer,90 ) setPedAnimation( localPlayer, "WEAPONS", "SHP_Tray_Pose",0,false) setWeaponOwner(weapon,localPlayer) end end addCommandHandler ( "attach", attach ) local aimSensitivity = 330; function rotateGun_Handler(cX, cY, aX, aY, wX, wY, wZ) local oX, oY, oZ, oRX, oRY, oRZ = getElementAttachedOffsets(weapon); --if (oRX-((cY-0.5)*aimSensitivity) > 45 or oRX-((cY-0.5)*aimSensitivity) < 30) then -- Pitch Restriction --oRX = oRX-((cY-0.5)*aimSensitivity); --end if (oRZ-((cX-0.5)*aimSensitivity) > 30 or oRZ-((cX-0.5)*aimSensitivity) < 50) then -- Yaw Restriction oRZ = oRZ-((cX-0.5)*aimSensitivity); end setCameraTarget(localPlayer,localPlayer) setElementAttachedOffsets(weapon, oX, oY, oZ, oRX, oRY, oRZ); setCursorPosition(screenW/2, screenH/2); end addEventHandler( "onClientCursorMove", getRootElement( ), rotateGun_Handler) addEventHandler("onClientRender", root, function() local _,_,rZ = getElementRotation(weapon) setElementRotation(localPlayer, 0, 0, rZ) end ) function fireme() setTimer(function() if getWeaponState(weapon) == "ready" then setWeaponState(weapon, "firing") else return end end,1000,0) end bindKey("mouse1", "down",fireme)
  17. The only way to zoom in is with setCameraMatrix. If you have any other idea, why do you keep asking?
  18. Yes, it is required. If you put it in any different folder, it won't work. Just ignore that name. Put your scripts in MTA/server/mods/deatchmatch/resources
  19. If you want from admin panel, you must edit admin panel. isObjectInACLGroup aclGetGroup -- Console in this case
  20. Zoom in with setCameraMatrix as I told you before.
  21. Well, script doesn't handle whole voice thing. You can stop it, and use: setPlayerVoiceBroadcastTo setPlayerVoiceIgnoreFrom onPlayerVoiceStart onPlayerVoiceStop
  22. GTX

    help !!

    If you made that, you would know how to make gun rotate faster. You even made a variable. Therefore, I doubt this is your script. local x,y,z = getElementPosition(localPlayer) local gunCol = createColSphere ( x, y, z, 2 ) local vehicle = getPedOccupiedVehicle (localPlayer) local x2,y2,z2 = getElementPosition(vehicle) local screenW,screenH = guiGetScreenSize() local weapon function attach ( ) local detection = isElementWithinColShape ( localPlayer, gunCol ) if detection then weapon = createWeapon("minigun", x2, y2, z2+2) attachElements ( weapon, vehicle, 0, -1.5, 0.7 ) setWeaponClipAmmo(weapon, 99999) -- setWeaponState(weapon, "firing") setWeaponProperty(weapon, "fire_rotation", 0, -30, 0) --setElementPosition ( localPlayer, x2, y2-1.5, z2+2 ) attachElements ( localPlayer, weapon, 0, 0, 0 ) setElementRotation(weapon,0,0,180) setPedRotation(localPlayer,90 ) setPedAnimation( localPlayer, "WEAPONS", "SHP_Tray_Pose",0,false) setWeaponOwner(weapon,localPlayer) end end addCommandHandler ( "attach", attach ) local aimSensitivity = 330; function rotateGun_Handler(cX, cY, aX, aY, wX, wY, wZ) local oX, oY, oZ, oRX, oRY, oRZ = getElementAttachedOffsets(weapon); --if (oRX-((cY-0.5)*aimSensitivity) > 45 or oRX-((cY-0.5)*aimSensitivity) < 30) then -- Pitch Restriction --oRX = oRX-((cY-0.5)*aimSensitivity); --end if (oRZ-((cX-0.5)*aimSensitivity) > 30 or oRZ-((cX-0.5)*aimSensitivity) < 50) then -- Yaw Restriction oRZ = oRZ-((cX-0.5)*aimSensitivity); end setCameraTarget(localPlayer,localPlayer) setElementAttachedOffsets(weapon, oX, oY, oZ, oRX, oRY, oRZ); setCursorPosition(screenW/2, screenH/2); end addEventHandler( "onClientCursorMove", getRootElement( ), rotateGun_Handler) addEventHandler("onClientRender", root, function() local _,_,rZ = getElementRotation(weapon) setElementRotation(localPlayer, 0, 0, rZ-10) end ) function fireme() setTimer(function() if getWeaponState(weapon) == "ready" then setWeaponState(weapon, "firing") else return end end,1000,0) end bindKey("mouse1", "down",fireme)
  23. GTX

    question

    Hide current crosshair and simply make a new one? There were lots of questions asked on how to make custom crosshairs.
×
×
  • Create New...