Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. How do you know that my care for performance optimization is low...? I didn't post any code, all I did was mention one way to approach the problem. Dude, I'm not even gonna bother; I came here to help him, and all you're doing now is trying to act all high and mighty. Mine is just one way to do it out of many. I never claimed it to be better than yours or anyone else's so stop acting like I did. Golly, you don't "sound" arrogant. You are.
  2. ...Excuse me? How is it bad code? I didn't provide him with any code, I merely suggested what functions he could use to achieve the scrolling effect. And it doesn't affect the performance, at least not to my experience - I'm using this method both for my internet radio and scoreboard. And if it does indeed start to lag, there are ways to optimize it. The point of the matter is that it does work, I never claimed it to be a better method than yours - I never claimed it to be a reply sent from heaven so back the fuck off dude. I'm trying to help as much as you, really can not be bothered with arrogant people such as yourself. This is the very reason I took a break from MTA Forums to begin with, full with nothing but arrogant people who see themselves as gods and better than everyone else - or thieves.
  3. Why take it to the extreme? I merely suggested what I use for my own needs, there are obviously ways to optimize it. So it doesn't necessarily render what won't be shown on screen. Did I claim it to be the best way to do it? No, there are many different ways to find a solution to this problem. All in all, it comes down to the way you prefer making things. It suits my needs perfectly, and it's easy to work with. I haven't had and I sincerely doubt I will encounter any performance issues. How about actually contributing to my suggestion rather than to try to bash it with arrogance?
  4. What you do is create a render target, and then draw the text on this. That way, any text that goes outside of the render target will be cut off. Thus, you can just edit the Y position of all the text and whatever you draw inside that target to make it look like you're scrolling. I'll leave it to you to search the MTA Wiki for the functions you need, see what you can come up with on your own. Then come back here and I'll help further if needed.
  5. No, he means to edit the .txd of .dff file itself. With a program such as N++ or whatnot.
  6. If you're looking for respect, I'm sorry, but MTA is not the place. Here you'll find nothing but ungrateful people and thieves.
  7. Come on man, there's no need for such behaviour. @CoreyHUN: Are these sounds being played in 3D space, or not? Because it sounds as though you're just using playSound, which makes it sound a bit too loud and not very realistic.
  8. If you read the Wiki thoroughly you'd find out that Element Data is not saved. Whenever you leave the server, this data is lost. You'll want to use setAccountData for the data to be stored in the database. This data is then bound to that account. Works pretty much the same way as Element Data.
  9. That event does not trigger for projectiles. The rocket launcher fires a projectile. What you can do is use the event onClientExplosion instead and then create a col sphere at that location to check if there are any vehicles inside the radius. If there are, and they're of the Rhino model - apply damage depending on how close to the center they are.
  10. ...What does it actually do? Where does it put the message? Your screenshots aren't exactly good at showcasing what the actual script does since there's 5 million things going on.
  11. You use triggerClientEvent on all current players, and the triggered event then in return runs playSound or playSound3D. You can then attach the sound to a car via attachElements.
  12. Haha calm down there buddy, I'm not criticizing your resource.
  13. It's still text-to-speech. Only difference is that you have specific messages read between specific players
  14. Text-to-speech in MTA has actually been around for quite a while
  15. Personally I would make the weapons invisible, and move them to where the miniguns on the car model are. And probably use another weapon, the UZI and Tec-9 in GTA:SA arguably has the worst sound effect of all the guns
  16. Dealman

    LUAC Help

    It's not a matter of being a retard, it's a matter of not wanting to provide help for those who use other people's work without permission. If the script is compiled, it's compiled for a reason - not to be edited. If your friend did give it to you, he should also have the source code for it. You'll have to ask him to either give you the source code - or make the edit for you and then compile it. Rather obvious that people will find this suspicious, don't you think? No need to throw words around like that
  17. You can use col shapes instead, and then use isElementWithinColShape.
  18. Well you're not telling it to do otherwise, you're only checking if they're in a vehicle and the model. Of course it's still gonna fire so long as the model ID is the same - the script won't magically understand what to do. One solution would be to use element data, set the element data on the vehicle with a gun to true - and only fire it if the current vehicle has that value set to true - and the player is inside that vehicle.
  19. Haha that's an interesting script
  20. Dealman

    Second Rhino

    Of course there is, you can use processLineOfSight. If it hits a Rhino, damage it. Of course you'd have to create dummy explosions and muzzleflashes and all that jazz.
  21. Why are you telling us not to steal it when you claim it's a released gamemode? This is the Valhalla Gaming RP gamemode, a leaked gamemode as far as I'm aware. Therefore you're not likely to get any help with this.
  22. Dealman

    Vehicle weapon

    Do you even read the code? When you create the minigun, you have this line of code; setWeaponState(weapon, "firing") Of course it will always be firing when you set its weapon state to firing Edit: To "enter" the minigun, you're best off using collision spheres, attach it to the minigun and trigger an event whenever a client enters it. So whenever a player is inside that sphere, and he press for example E, he will be attached to the minigun.
  23. Dealman

    Vehicle weapon

    Well yeah, all you did was copy and paste the stuff and make no changes for it to work whatsoever...
  24. Dealman

    Vehicle weapon

    You need a lot more than just that, you can set it up to fire in a variety of ways. For one, you can use getKeyState inside a render event. Or you can just bind a key using bindKey. As looking around with it, I was working on something like this before, got pretty close to release - but as always I keep jumping between projects of mine. Here's a little snippet of what I used to look around with my weapons(with restrictions and sensitivity); local aimSensitivity = 30; function rotateGun_Handler(cX, cY, aX, aY, wX, wY, wZ) local oX, oY, oZ, oRX, oRY, oRZ = getElementAttachedOffsets(theWeapon); if (oRX-((cY-0.5)*aimSensitivity) > 345 or oRX-((cY-0.5)*aimSensitivity) < 30) then -- Pitch Restriction oRX = oRX-((cY-0.5)*aimSensitivity); end if (oRZ-((cX-0.5)*aimSensitivity) > 330 or oRZ-((cX-0.5)*aimSensitivity) < 50) then -- Yaw Restriction oRZ = oRZ-((cX-0.5)*aimSensitivity); end setElementAttachedOffsets(theWeapon, oX, oY, oZ, oRX, oRY, oRZ); setCursorPosition(screenW/2, screenH/2); end I updated these with onClientCursorMove.
  25. Heli is not defined client-side. You need to pass it to the Client via triggerClientEvent. -- Server triggerClientEvent(plr, "llk" plr, Heli) -- Client function lkk(theHeli) attachElements(so, theHeli) Read the Wiki thoroughly and you'll be able to figure things like these out on your own
×
×
  • Create New...