-
Posts
1,273 -
Joined
-
Last visited
-
Days Won
1
Everything posted by GTX
-
You're welcome. Try using http://xnview.com
-
Wouldn't be setElementCollisionsEnabled easier?
-
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 )
-
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.
-
Post your code here. No one will add you on Skype just because of some resource. We don't need video or photos.
-
Wrong section. viewforum.php?f=105 viewforum.php?f=106
-
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
-
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")
-
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.
-
Do not add it inside onClientRender. requestBrowserDomains({"mtasa.com", "facebook.com", "fbcdn.net"})
-
I think it'll still transmit voice.
-
What's wrong with triggerServerEvent and triggerClientEvent? No, there's no other way.
-
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.
-
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)
-
The only way to zoom in is with setCameraMatrix. If you have any other idea, why do you keep asking?
-
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
-
If you want from admin panel, you must edit admin panel. isObjectInACLGroup aclGetGroup -- Console in this case
-
Zoom in with setCameraMatrix as I told you before.
-
Well, script doesn't handle whole voice thing. You can stop it, and use: setPlayerVoiceBroadcastTo setPlayerVoiceIgnoreFrom onPlayerVoiceStart onPlayerVoiceStop
-
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)