Jump to content

subenji99

Members
  • Posts

    264
  • Joined

  • Last visited

Everything posted by subenji99

  1. Well "killer" does not match "killerid" so the first return will be nil. Have you tried testing this on a player or just using createPed? While the function is a ped function, its functionality may only work with other players due to factors such as hit feedback from the client end. A better test would be either get a second player, or kill yourself with a grenade/car/fall/drowning. They all have their own "weapon" id's, and some may have bodypart ones as well. You can see some code examples for "onPedWasted" (turns out it works fine ) in the "killmessages" resource, which you should already have or you can look at it at: http://code.google.com/p/multitheftauto ... lmessages/ Look at the definitions.lua for translating weapon id's (it's got the obscure ones that are not actually weapons that are therefore not listed on the wiki, such as run over by a vehicle or drowning) and killmessages_server.lua for the onPedWasted event handler and called function. Most of the client code is just handling the GUI display and not relevant to your task.
  2. Well "killer" does not match "killerid" so the first return will be nil. Have you tried testing this on a player or just using createPed? While the function is a ped function, its functionality may only work with other players due to factors such as hit feedback from the client end. A better test would be either get a second player, or kill yourself with a grenade/car/fall/drowning. They all have their own "weapon" id's, and some may have bodypart ones as well. You can see some code examples for "onPedWasted" (turns out it works fine ) in the "killmessages" resource, which you should already have or you can look at it at: http://code.google.com/p/multitheftauto ... lmessages/ Look at the definitions.lua for translating weapon id's (it's got the obscure ones that are not actually weapons that are therefore not listed on the wiki, such as run over by a vehicle or drowning) and killmessages_server.lua for the onPedWasted event handler and called function. Most of the client code is just handling the GUI display and not relevant to your task.
  3. Try using the clientside "onClientPedWasted" event instead. The server event may not be passing along the arguments properly, but the clientside event does work correctly and is indeed used for resources such as deathmessages. Edit: this was incorrect, but I did expect the client event to work with scripted peds.
  4. Try using the clientside "onClientPedWasted" event instead. The server event may not be passing along the arguments properly, but the clientside event does work correctly and is indeed used for resources such as deathmessages. Edit: this was incorrect, but I did expect the client event to work with scripted peds.
  5. While your meta file is in an odd order compared to most, everything is there and correct, so I don't think there's a problem with that. You can load map files contained within the same resource as a gamemode - it's not ideal, a gamemode and its maps should be separate resources, but it does work fine. The problem may be that a gamemode does not get unloaded correctly. Next time it happens, check which resources are currently running. You can check on the resources tab of the admin panel, or the web admin page if elementbrowser or resourcebrowser is running. You may find that there is a bug in one of the gamemodes that is stopping it from unloading or cleaning up properly. Otherwise, the problem will likely be starting a new gamemode from within a gamemode. Instead, trigger a votemap or trigger the round end event and use the mapcycler to advance through your gamemodes. https://wiki.multitheftauto.com/wiki/Res ... otemanager https://wiki.multitheftauto.com/wiki/Resource:Mapcycler I'll admit I'm grasping at straws a little, it is a bit odd for a gamemode not to load its map file.
  6. While your meta file is in an odd order compared to most, everything is there and correct, so I don't think there's a problem with that. You can load map files contained within the same resource as a gamemode - it's not ideal, a gamemode and its maps should be separate resources, but it does work fine. The problem may be that a gamemode does not get unloaded correctly. Next time it happens, check which resources are currently running. You can check on the resources tab of the admin panel, or the web admin page if elementbrowser or resourcebrowser is running. You may find that there is a bug in one of the gamemodes that is stopping it from unloading or cleaning up properly. Otherwise, the problem will likely be starting a new gamemode from within a gamemode. Instead, trigger a votemap or trigger the round end event and use the mapcycler to advance through your gamemodes. https://wiki.multitheftauto.com/wiki/Res ... otemanager https://wiki.multitheftauto.com/wiki/Resource:Mapcycler I'll admit I'm grasping at straws a little, it is a bit odd for a gamemode not to load its map file.
  7. https://wiki.multitheftauto.com/wiki/CreateMarker https://wiki.multitheftauto.com/wiki/GiveWeapon https://wiki.multitheftauto.com/wiki/GetPlayerMoney https://wiki.multitheftauto.com/wiki/TakePlayerMoney https://wiki.multitheftauto.com/wiki/OnMarkerHit If you cannot work it out from those functions and that event you should read robhol's guide again. http://robhol.pipe.no/guide/basics/ Also, learn which section is relevant to your topic. Suggestions is not for scripting help.
  8. https://wiki.multitheftauto.com/wiki/CreateMarker https://wiki.multitheftauto.com/wiki/GiveWeapon https://wiki.multitheftauto.com/wiki/GetPlayerMoney https://wiki.multitheftauto.com/wiki/TakePlayerMoney https://wiki.multitheftauto.com/wiki/OnMarkerHit If you cannot work it out from those functions and that event you should read robhol's guide again. http://robhol.pipe.no/guide/basics/ Also, learn which section is relevant to your topic. Suggestions is not for scripting help.
  9. Here's your problem, you are not specifying a map to load with your gamemode switch. It'll load without a map. The current most common way is with the votemanager resource. If you don't want to use it, the mapcycler resource provides the functionality you want, you just need to provide it with gamemode/map rotation. Details on the maplimits wiki page. If you want to stick to your scripting option, I recommend using table getMapsCompatibleWithGamemode ( [ resource theGamemode ] ) and then choosing one at random to insert into changeGamemode.
  10. Here's your problem, you are not specifying a map to load with your gamemode switch. It'll load without a map. The current most common way is with the votemanager resource. If you don't want to use it, the mapcycler resource provides the functionality you want, you just need to provide it with gamemode/map rotation. Details on the maplimits wiki page. If you want to stick to your scripting option, I recommend using table getMapsCompatibleWithGamemode ( [ resource theGamemode ] ) and then choosing one at random to insert into changeGamemode.
  11. The easiest way to do this is not to monitor what I expect you thought as the obvious "onClientPlayerJoin", as, Instead, use event "onClientResourceStart", attached to "getResourceRootElement(getThisResource())". This will run your code for displaying the image for that client when it's own resource is first started. (That bit is important: don't use getRootElement() or the code will run when ANY resource starts, including maps and gamemodes) The first time a resource starts for players (assuming it was already running on the server) is after all resources have finished downloading, making this the earliest point after a player connects to run scripts on them.
  12. The easiest way to do this is not to monitor what I expect you thought as the obvious "onClientPlayerJoin", as, Instead, use event "onClientResourceStart", attached to "getResourceRootElement(getThisResource())". This will run your code for displaying the image for that client when it's own resource is first started. (That bit is important: don't use getRootElement() or the code will run when ANY resource starts, including maps and gamemodes) The first time a resource starts for players (assuming it was already running on the server) is after all resources have finished downloading, making this the earliest point after a player connects to run scripts on them.
  13. subenji99

    Problems Here!

    In that case, you've made extensive modifications to your copy of San Andreas. Completely uninstall and reinstall it to get original data files.
  14. subenji99

    Problems Here!

    In that case, you've made extensive modifications to your copy of San Andreas. Completely uninstall and reinstall it to get original data files.
  15. Why? I don't think anyone in the MTA Team uses the Cryllic language, so it won't be for their personal need. What makes you so deserving of bumping the priority list? If you want this soon, MTA is open source. If you or a friend has the skill and is willing to help, I'm certain the Team will be more than happy to merge Cryllic GUI support worked on by a third party into MTA. It's going to be the quickest solution for you. Otherwise, you shall just have to wait until features you would like can be implemented, like the rest of us unable to help out.
  16. Why? I don't think anyone in the MTA Team uses the Cryllic language, so it won't be for their personal need. What makes you so deserving of bumping the priority list? If you want this soon, MTA is open source. If you or a friend has the skill and is willing to help, I'm certain the Team will be more than happy to merge Cryllic GUI support worked on by a third party into MTA. It's going to be the quickest solution for you. Otherwise, you shall just have to wait until features you would like can be implemented, like the rest of us unable to help out.
  17. subenji99

    help

    I believe he broke his own record by bumping within the same minute this time.
  18. subenji99

    help

    I believe he broke his own record by bumping within the same minute this time.
  19. subenji99

    Cancel button

    I'll just point this out too that was not mentioned in the code comments, as everyone makes this mistake. addEventHandler( "onClientGUIClick", Cancel, CloseLoginWindow, false ) Note the last argument is false. If you are familiar with the wiki description, you know that it is the "getPropagated" argument. If it was set to true, it would receive the click event from any parent or child of the button in the element tree. If you don't understand the element tree, it's worth learning, but I won't go into it now. What it results in is if the window is open, naturally your button is a "child" of the window. So with it set true, if you click anywhere within the window, the button will receive the event as if you clicked on the button itself. The mouse click event "propagated" down the element tree. And the problem is then multiplied with several GUIClick event handlers, if say, you had several buttons on this form and an event for each. getPropagated = false means the event has to directly involve this element - in this case, you have to click this button (your "Cancel" button element in the case of this code snippet) for the event to work. Note you use propagated all the time normally, so don't set it false all the time - for example any event attached to the root element is likely to use it, as a large majority of events don't trigger on the root element itself. (You may want to catch when any player is spawning for example, but that triggers on the player element involved.) Just remember to set it false when dealing with GUI. (I can't help making large posts)
  20. subenji99

    Cancel button

    I'll just point this out too that was not mentioned in the code comments, as everyone makes this mistake. addEventHandler( "onClientGUIClick", Cancel, CloseLoginWindow, false ) Note the last argument is false. If you are familiar with the wiki description, you know that it is the "getPropagated" argument. If it was set to true, it would receive the click event from any parent or child of the button in the element tree. If you don't understand the element tree, it's worth learning, but I won't go into it now. What it results in is if the window is open, naturally your button is a "child" of the window. So with it set true, if you click anywhere within the window, the button will receive the event as if you clicked on the button itself. The mouse click event "propagated" down the element tree. And the problem is then multiplied with several GUIClick event handlers, if say, you had several buttons on this form and an event for each. getPropagated = false means the event has to directly involve this element - in this case, you have to click this button (your "Cancel" button element in the case of this code snippet) for the event to work. Note you use propagated all the time normally, so don't set it false all the time - for example any event attached to the root element is likely to use it, as a large majority of events don't trigger on the root element itself. (You may want to catch when any player is spawning for example, but that triggers on the player element involved.) Just remember to set it false when dealing with GUI. (I can't help making large posts)
  21. If you are making films in SA, unless you are specifically showing off MTA features, you may be better off with this mod: http://www.gtaforums.com/index.php?showtopic=239410 It will certainly give you much better control over filming peds and vehicles along pre-pathed routes. Of course, the perfect solution may be to mix the 2 together, using footage from both MTA and this mod for different scenes depending on your goals. (Don't mis-understand here, MTA is certainly capable, but when an alternative is available, why make things harder for yourself? )
  22. If you are making films in SA, unless you are specifically showing off MTA features, you may be better off with this mod: http://www.gtaforums.com/index.php?showtopic=239410 It will certainly give you much better control over filming peds and vehicles along pre-pathed routes. Of course, the perfect solution may be to mix the 2 together, using footage from both MTA and this mod for different scenes depending on your goals. (Don't mis-understand here, MTA is certainly capable, but when an alternative is available, why make things harder for yourself? )
  23. Any server admin worth his salt can just use runcode to do this, or make a 5 second script if they want it set permanently. It's not even worth a community resource.
  24. Any server admin worth his salt can just use runcode to do this, or make a 5 second script if they want it set permanently. It's not even worth a community resource.
  25. This post is why you get a friend who knows some English to help you type your post rather than use Google Translate. I agree with robhol. Memory could not be "read" errors in MTA are typically outdated dependencies. Check your drivers and DirectX 9, and check to make sure the Visual C++ Runtime installed correctly. No idea how much of that he will understand, but I don't know much French.
×
×
  • Create New...