Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Lestat

  1. I have a pc I want to use to host a server im working on. Core i7 2600 -CPU Radeon HD 6800 -video card Internet 20 Mb How many players would I be able to host with that.
  2. https://wiki.multitheftauto.com/wiki/Se ... ounceValue "This function allows you to change ASE announce values for any player using a specified key. As an example this can be used to change the "score" value which will be shown at game-monitor.com's server list." As I understand, an Announce Value is pretty much the same as an Element Data. It has a key and it has a value. The difference is that the Announce Value can be accessed from outside the server. I understand the example about game-monitor.com. That one checks for a "score". Can you provide me other examples of where Announce Values are used or how can I use them?
  3. I didn't know that, a very good way of doing it. Will try it. Thank you.
  4. Unfortunately that didn't work, but I could do what I wanted to do other way. Not as good but it works Suggestion, we should be able to get the camera zoom when using sniper and camera.
  5. You can get the fov of the camera with getCameraMatrix, but the fov doesnt change when you zoom with sniper so its not that. the position of the camera, the player and the target (lets say other player) doesnt change when you zoom with sniper. So the camera doesn't move, the fov doesnt change. It has to be a zoom value. But it seems we cant get it
  6. Is there a way to get Sniper Zoom % or distance? I tried getCameraMatrix() but it seems the camera position doesn't change, and camera has no getZoom function.
  7. Hi, I reported this bug some days ago. http://bugs.mtasa.com/view.php?id=8952 It was closed as duplicate but I no issue was linked as the "original". And I searched and I couldn't find it. So I think it was closed by error. I think they thought I was reporting the "counting hex codes in chat char count", but its not about that. Its about the width of EACH character not being calculated correctly if using colorcodes. the issue provides a screenshot so you can see what I'm talking about. Can you give it a check, I'm sure it won't be hard to fix (unfortunately I don't know c++ but as soon as I learn I will contribute).
  8. Lestat

    Chatbox HexColors

    Hi. I have upgraded my development server (for a WIP gamemode) to 1.5 Server. I noticed now if you use a Color code in outputChatBox (with colorcodes enabled obviously) it will add a space character automatically. I think this is undesired behaviour as we should be able to decide if we put a space character when using colorcodes. I will explain it better graphically: suppose you use this: outputChatBox("#FFFFFFHello #FF0000W#00FF00O#0000FFR#FFFF00L#FF00FFD", root, 255, 255, 255, true) In Server 1.4 it would have output this: Hello WORLD In Server 1.5 outputs this: Hello W O R L D A space character is added automatically, thats not always the desired behaviour. So kindly request to let us handle the spaces Thank you for your time. Forget it, I found the issue, gonna report as a bug.
  9. https://wiki.multitheftauto.com/wiki/OnConsole "Note: The event will not be triggered if the message can be processed by an existing command handler" function inputConsole ( text ) if ( getElementType ( source ) == "player" ) then --Typed by a Player outputChatBox("Player C: "..text, getRootElement()) else --Typed by the Server Console outputChatBox("Server C: "..text, getRootElement()) end end addEventHandler ( "onConsole", getRootElement(), inputConsole ) When I first created this code it worked flawlessly, the event only triggered for non-handled(non-existent) commands. But after sometime (refreshing resources, restarting the server etc), now the events triggers even for handled commands. Is it a bug? or am I missing something? Or maybe I imagined it and it triggered for handled commands since the start.
  10. Lestat

    Progress bar

    Try: function createprog () loadingprog = guiCreateProgressBar(475, 653, 330, 33, false) setTimer (progress, 1000, 10) setTimer (destroyElement, 10010, 1, loadingprog) end function progress() curprog = guiProgressBarGetProgress (loadingprog) guiProgressBarSetProgress(loadingprog, curprog+10) end
  11. I want to prevent users being able to execute commands while not logged in. (The moment they are presented with the login screen). function preventCommand(command) if isGuestAccount(getPlayerAccount(source)) then outputChatBox("Guest using command", source) cancelEvent() end end addEventHandler("onPlayerCommand", root, preventCommand) The above code succesfully cancels commands handled in the server. But it doesnt cancel commands handled in the client. Both prints the message in the chatbox. Any workaround?
  12. Hi. Can someone tell me the vehicles that have 3 and 4 colors? This file has some predefined color ids for spawning vehicles without specifying a color: >> vehiclecolors.conf Are ALL cars listed there? only these 3 vehicles seem to have 4 colors listed: 483 1 31 1 0 483 1 31 1 0 483 1 20 3 0 483 1 5 0 0 483 0 6 3 0 483 3 6 3 0 483 16 0 8 0 483 17 0 120 0 524 60 24 23 0 524 61 27 123 0 524 65 31 31 0 524 61 61 30 0 524 81 35 23 0 524 62 61 62 0 524 83 66 64 0 524 83 64 64 0 446 0 0 0 1 446 1 5 1 1 446 3 3 0 1 446 1 22 1 1 446 1 35 1 1 446 1 44 1 1 446 1 53 1 1 446 1 57 1 Is it safe to assume only these 3 vehicles support 4 colors, there are 0 who support exactly 3 colors and all the others are 2 colors only? Also, these 3 cars who support 4 colors, if I "customize" them using the admin resource, the 4th color is no where to be seen. So are they actually 3 colors only? As you can see in the screenshot, the 4th color (yellow) is not there. http://s15.postimg.org/4e2q4120p/mta_sc ... _03_22.png (I know the difference between color ids and rgb values, my questions are not about that)
  13. addEventHandler("onClientPlayerDamage", localPlayer, function (_, _, body, loss) if body == 9 and not wasEventCancelled() then setElementHealth(source, getElementHealth(source)-(loss*0.5) end end) The "not" means if the event was NOT cancelled. But you want to check if it was. Also you should ensure the second EventHandler gets called after the first always. So use the priority argument (the first one is "normal" by default, so "normal-1" should work flawlessly): addEventHandler("onClientPlayerDamage", localPlayer, function (_, _, body, loss) if body == 9 and wasEventCancelled() then setElementHealth(source, getElementHealth(source)-(loss*0.5) end end, true, "normal-1")
  14. Any way to get the World Models (objects) of default sa map? I want to get all models of the map of a certain Model ID. for i, v in ipairs( getElementsByType ( "object" ) ) do if getElementModel ( v ) == 1257 then local x,y,z = getElementPosition(v) createBlip ( x,y,z, 12 ) end end This seem to get only the objects created by the gamemode .map
  15. Yeah, I also thought that.
  16. Whats the difference between Name and NametagText? local nameTag = getPlayerNametagText ( thePlayer ) local name = getPlayerName ( thePlayer ) They both return the same string with colorcodes.
  17. Whats this Vehicle Upgrade for? https://wiki.multitheftauto.com/wiki/Vehicle_Upgrades "1086 stereo Stereo Stereo"
  18. You're right Tomas, it is in the admin resource, gonna make my own Admin Panel, so it won't be needed to catch it. Also very helpful information John Smith. It will be very useful for another thing I wanna do. Thank you both.
  19. Is it possible to cancel this message: http://s7.postimg.org/667rxed89/mta_scr ... _08_10.png "you can only change your nick once every 5 seconds" I want to use my own dx messages for that. Thats not the only message I would like to have overriden. So, is there a way I can "catch" a message and not show it to the user?
  20. Whats the difference between MTA server x86 and x64? I installed the 64 bits one, copied my resources, and everything seems the same. Is it more performant?
  • Create New...