Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. Aye, it sure is possible. It all depends on how you want to set it up. Arguably making sure it's nicely synced between all clients would be the hardest part. Basically you'll need to use onClientMouseMove to detect whenever the client is aiming the turret left, right, up or down. If you don't want to use the mouse, you can use getKeyState bound to either a timer or the renderer. I wrote something somewhat similar a while ago, but it was for vehicles - but in general it follows the same principle. I'll see if I can dig it up.
  2. Dealman

    Help with HUD

    I usually don't provide examples, but here you go; Meta.xml Client.lua Images
  3. Dealman

    Help with HUD

    Most likely they are 2 different images, one being the outline and the other being the fill. You can achieve the "fill" effect by using dxDrawImageSection.
  4. Shame I don't have my laptop or I could've done some testing on my end, don't really feel like messing about with virtual machine. Also, if you use [lua] tags instead of , it will get syntax highlighting. And the functions are linked to the wiki, very convenient stuff for us!
  5. Not quite sure what you're asking for... Do you mean custom names, or what?
  6. Of course it is, a little Google search and you'd have found this; ALTER TABLE It has a link to a few examples, which should help you get going
  7. You'd probably have to find the function createPlayerVehicle for us.
  8. You could use the onPlayerLogin event, and once they have logged in - use triggerClientEvent to make it visible.
  9. Dealman

    question

    Simply use bindKey and getKeyState(1 check) both. Alternatively you can use onClientKey event along with getKeyState(2 checks).
  10. I can't see anything related to VIPs in that server-side script...
  11. Try changing: addEvent ( "SAEGSpawners:spawnVehicle", true ) addEventHandler ( "SAEGSpawners:spawnVehicle", root, function ( id, x, y, z, rz, job ) local c = exports['SAEGAntiRestart']:createPlayerVehicle ( source, id, x, y, z, rz, true, job ) end ) To this: addEvent ( "SAEGSpawners:spawnVehicle", true ) addEventHandler ( "SAEGSpawners:spawnVehicle", root, function ( id, x, y, z, rz, job ) local c = exports['SAEGAntiRestart']:createPlayerVehicle ( source, id, x, y, z, rz, true, job ) addVehicleUpgrade(c, 1010) end )
  12. Dealman

    colsphere

    No warnings or errors? Have you tried visualizing it to see if it's there? Use setDevelopmentMode and then the showcol command.
  13. The problem is that you're trying to use server-side functions inside a client-side script. Look at the colour coding. Orange = Server-Side ONLY Red = Client-Side ONLY Blue = Server- and Client-Side addCommandHandler ("speakers", openGUI) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)),aclGetGroup("Owner")) then triggerServerEvent(player,"onSpeakerCreate",player) end end What does the server-side script look like?
  14. If you use getElementPosition you'll get the element's 3D Vector(X, Y and Z). If you do this for both the vehicle, and the ball - you have both their vectors. I would highly, highly recommend watching some of the vector tutorials over at Khan Academy. Absolutely brilliant videos. You can start here. There's quite a few videos available, and it might seem very confusing at first. But it's definitely worth putting effort into as you can do some really cool stuff with this. For example, advanced physics Edit: Here's an example of a little test I made;
  15. Do the integers have any specific meaning, or does it just act as an ID for the row? If so, you could do this; local aTable = { [4] = "row4", [2] = "row2", [1] = "row1", [3] = "row3", } table.sort(aTable) for i=1, 4 do print(aTable[i]) end I suggest you use a website such as repl.it and you can try things like these directly in your browser.
  16. This isn't your script is it? It's already using triggerServerEvent so if you made it you would be familiar with these. I'm assuming you have a server-side script as well. You should have an event called "onSpeakerCreate" in the server-sided script. As a quick fix, you could use isObjectInACLGroup inside of that event. That way, you don't necessarily have to trigger a client event. Click that link, read about the arguments and then look at the examples. You will be able to figure it out if you put some effort into it.
  17. I played around with it a little bit, and you can do some pretty sweet stuff with it. But much like JR10 said, my biggest issue with CEF was that it's really slow. Most gifs and animations play at such a low speed it just looks jittery. So I've gone with DX instead. Edit: I just noticed you can change the browser speed under Advanced settings tab...
  18. Dealman

    RPG aiming

    Of course, you can use setElementVelocity to manipulate the velocity of the rocket.
  19. You didn't even look at one of the functions, did you? Use the MTA Wiki, it has examples - learn from that. I sincerely doubt you'll learn much if you rely on people to give you complete code all the time. Visit this link, and do some reading; isObjectInACLGroup. You can't expect everything to be served on a silver platter
  20. Dealman

    [WIP] LIFE

    I was working on something similar akin to Steam overlay, but instead it was like an instant messenger with the ability to see what server other people were on as well as try and join them. Although I never finished it, the biggest issue will be to make sure it's widely distributed as well make sure that everyone keeps it updated. Also, would it be open source or compiled? Personally, I wouldn't trust something like this on my server unless I could review the code myself.
  21. Why would you say you have over 4 000 accounts when you don't? Did you manage to fix it, or is it still lagging? Did you apply our changes to the loop or not?
  22. What did you try? What doesn't work? I gave you the functions you need, all you have to do is put some effort into it. Research and patience is key.
  23. That's true, although you would also get all the relative stuff in one place which is an advantage as well. Aye. Though I would argue unless you're able to understand the Race resource - you would be better off creating it externally in your own resource. Either way works!
  24. You can achieve this by using some server-side functions. You would have been able to figure this out if you had looked at the MTA Wiki for functions that seem relevant - or by searching this forum(this has been asked quite a lot). Either way, these functions in particular is what you'll want; addEvent -- Create a custom event addEventHandler -- Handle custom event triggerServerEvent -- Tell the Server to check if the client is in the specific ACL group getPlayerAccount -- Get the player's account pointer getAccountName -- Get the account's username isObjectInACLGroup -- Check if the above name is in the required ACL group triggerClientEvent -- Have the server trigger a client-side event if true or false
  25. You'll have to be a bit more patient than that Also, you can start with telling us what is wrong, rather than expecting us to read through all that code trying to find what's wrong.
×
×
  • Create New...