Jump to content

redditing

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by redditing

  1. In total, I have two questions, but on the same topic: - Is it possible to add an object instead of replacing it with another? - If not, what objects are not used by GTA / MTA San Andreas?
  2. I know what you mean and it doesn't work, the weapon texture has no alpha and will always be white texture
  3. It will be just white texture
  4. How can I set alpha weapon to 0 value, if weapon is not element?
  5. I would like to ask if there is a way to make a second weapon, for example to have two M4s, but to shoot differently, e.g. to have a different one with a rate of fire and the other one to deal more hp. Is there a way to do something like this?
  6. And I would also like to know why setElementData is dangerous and can it be replaced somehow with e.g. a table?
  7. I would like to know about two things: 1. Are the server-side and client-side timers dangerous and why? 2. Is it possible to do the function GetTickCount () timer?
  8. For example, I want to know how I can color an object a different color, e.g. stone red or smoke green, I would also like to add lines for cars that do not have type 2 color, e.g. infernus or super gt, and maybe some animations
  9. So I wanted to ask if someone would explain to me how to make my own shaders, I immediately say that I know there is an MTA page with examples but I don't understand anything of them so I prefer someone to explain it to me and what it is and how to create although the easiest script with shaders
  10. Is there a way to check for collisions where the player is looking without aiming the gun as if the getWorldFromScreenPosition and GetPedTargetCollision functions were combined?
  11. Ok thx. Do you know how you can send elementData from the server to the client?
  12. I have one question about client objects, if I use the "TriggerClientEvent" function on the server side script, whether the object that was saved on the client side and will be set with the triggerClientEvent function on the server side, will every player see it and will work in the same way as normally I would call it in the server side script "createObject (object, x, y, z)"? For example, such -- client addEvent("createObject", true) addEventHandler("createObject", root, function(object, x, y, z) createObject(x, y, z) end ) -- server triggerClientEvent(root, "createObject", root, 1372, 0, 0, 5) -- Would that be the same as this? -- server createObject(1372, 0, 0, 5)
  13. Forgive me for that font, I was just typing on my phone and the font was always changing on my phone, but thanks to you I was able to fix it, Thanks!
  14. imagine that you have two drawn dxdraws, and they overlap, only one of them is on the front and is all visible but covers the back part of the other dxdraw so my question is how to make dxdraw the first to the back and the second to the front of the screen
  15. How to set dxDraw to the back of the screen?
  16. I have a problem with my script and I don't know what the problem is, in the debug I write to me that in line 6,7 there is arg 1 in "nil" and I don't know why what's going on? local screenW, screenH = guiGetScreenSize() function CommuncationMouse() local cursrox, cursory = getCursorPosition() local cursrox = tonumber(cursrox) local cursory = tonumber(cursory) dxDrawImage(cursrox, cursory, screenW * 0.0766, screenH * 0.0593, ":test/guiBackgroundLongsquareLines.png", 0, 0, 0, 255, 0, 0, 255), true) dxDrawImage(cursrox, cursory, screenW * 0.0766, screenH * 0.0593, ":test/guiBackgroundLongsquare.png", 0, 0, 0, tocolor(0, 0, 0, 150), false) dxDrawText("TEST", (cursrox) - 1, (cursory) - 1, (screenW * 0.3948) - 1, (screenH * 0.1657) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("TEST", (cursrox) + 1, (cursory) - 1, (screenW * 0.3948) + 1, (screenH * 0.1657) - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("TEST", (cursrox) - 1, (cursory) + 1, (screenW * 0.3948) - 1, (screenH * 0.1657) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("TEST", (cursrox) + 1, (cursory) + 1, (screenW * 0.3948) + 1, (screenH * 0.1657) + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("TEST", cursrox, cursory, screenW * 0.3948, screenH * 0.1657, tocolor(255, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end
  17. There is no such function what are you talking about?
  18. So the problem is that there is a function called "animate" https://wiki.multitheftauto.com/wiki/Animate and with this function we can animate the GUI etc ... but there is one problem, because I would like to stop this function at some point and stop animating at some point, there is a way to do that ?
  19. I started scripting with GUI / dxDraw and would like to do some panning or alpha animation. And the question is how this animate works, I know it is shown on the MTA wiki, but I don't quite understand how, If someone would explain it to me, I would be grateful. By the way, I am sending the function I am talking about ... https://wiki.multitheftauto.com/wiki/Animate
  20. My goal is simple, after using GetPedCollisionTarget, I want it to return 3 numbers that correspond to the coordinates of the target that has collision detection, but for this function to return something, you must first aim the weapon. And here is the problem because when the player is aiming, the crosshair is somewhere close but not in the center of the center, and I want to get the coordinates of the target in the center, not somewhere nearby. And here comes the question, is it possible to make GetPedCollisionTarget work but without aiming the weapon? PLEASE HELP
  21. So if i using function "setCameraMatrix" then i can't rotation it. For example i want set camera in one point and turn it 90 degrees in left but i can't pls help! function DropCamera(player, command) local x, y, z = getElementPosition(player) setCameraMatrix(player, x, y, z+1.5, 0, 0, 90, 0, 0) end addCommandHandler("setcamera", DropCamera)
  22. function StandardWep() local x, y, z = getElementPosition(getLocalPlayer()) wep = createWeapon("m4", x+5, y, z) setWeaponFlags(wep, "shoot_if_blocked", false) setWeaponFiringRate(wep, 35) setWeaponProperty(wep, "damage", 25) setWeaponClipAmmo(wep, 35) setWeaponAmmo(wep, 100) end addCommandHandler("OnStandardWep", function(command, state) local s = string.upper(state) if s=="ON" then setWeaponState(wepM16, "firing") elseif s=="false" then setWeaponState(wepM16, "ready") else outputChatBox("There is no such condition of the weapon, you can only use 'ON / OFF'", 255, 50, 0) end end ) The point is that it does not hurt other players, what's more, other players do not even see the line of fire (I mean the yellow line which means how fast the bullets are moving and in which direction) and the weapon itself (M4), I know that you need to use triggerClientEvent but no I know how to apply it, please help me with an example ; -;
  23. Is it possible to change the model for one person so that this person has a different model visible to others? In the sense that I change the model of the M4 weapon and how I hold it, it is visible to others that I have this model, but when they pull out their M4, they do not have this model. It is possible?
×
×
  • Create New...