Jump to content

subenji99

Members
  • Posts

    264
  • Joined

  • Last visited

Everything posted by subenji99

  1. ccw has already implemented this. http://code.google.com/p/multitheftauto ... tail?r=470 If you are familiar with Subversion you can download the update, or just wait until the next resources package is available. (though I have a sneaking suspicion 1.0.1 is just about to be released, so it'll be available in the installer for that.) The command deletes the first record in the list on the currently loaded map, as cheaters usually go for that no.1 spot.
  2. NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments. Though I notice that it is not on the dxDrawText page.
  3. subenji99

    MTA bug!

    It's not a bug. Some gamemodes remove elements of the SA HUD, and some replace them with their own HUD displays. After all, if a gamemode doesn't use money why display that HUD element? Same for weapons, health, etc... Also, wrong section. This is for MTA versions before San Andreas.
  4. as 50p pointed out, the element has to exist before you attach a handler to it. The solution here is to attach your handler immediately after creating the marker: function creating ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( not isElement ( enterMarker ) ) and ( weapon == 27 ) then enterMarker = createMarker ( hitX, hitY, hitZ, "ring", 2.0, 255, 0, 0, 150 ) addEventHandler ( "onClientMarkerHit", enterMarker, Teleporting ) outputChatBox ( "You have created a first portal!", 255, 0, 0 ) elseif ( isElement ( enterMarker ) ) then exitMarker = createMarker ( hitX, hitY, hitZ, "ring", 2.0, 0, 0, 255, 150 ) addEventHandler ( "onClientMarkerHit", exitMarker, reteleporting ) outputChatBox ( "You have created a second portal!", 255, 0, 0 ) end end addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), creating ) function Teleporting ( thePlayer, matchingDimension ) local EnposX, EnPosY, EnPosZ = getElementPosition ( enterMarker ) setElementPosition ( thePlayer, EnposX, EnPosY, EnPosZ ) end function reteleporting ( thePlayer, matchingDimension ) local ExposX, ExPosY, ExPosZ = getElementPosition ( exitMarker ) setElementPosition ( thePlayer, ExposX, ExPosY, ExPosZ ) end This will also fix an error you whould have run into where only the first enter/exit marker would work if you tried to do things otherwise. Remember to remove your event handlers as you remove the markers too! By the way, there are still errors here, especially in your teleporting code. but if I told you how to do everything, what would you learn? EDIT: Damn, didn't notice the post date and that the previous post was a massive bump! But maybe the developer might work on this again now 1.0 is released.
  5. getElementHealth() returns an integer, not a string. --correction, it returns a float. (a number with decimal places) Use tostring(). Don't forget you'll have to update the label with guiSetText() regularly too, which also takes a string.
  6. server/mods/deathmatch/resources/freeroam/meta.xml: <setting name="*vehicles/maxperplayer" value="[2]" /> <!-- Maximum number of vehicles a player can have at the same time -->
  7. Is this file clientside? addCommandHandler doesn't pass a player element if it's run clientside as it would always be getLocalPlayer().
  8. Sorry, don't have timne atm for a full look at your code, but did spot this in all 3 bindKey-linked functions: function enginefunc( key , state ) if ( keyState == "down" ) then local player = getLocalPlayer ... You missed the brakets on calling the function: getLocalPlayer()
  9. https://wiki.multitheftauto.com/index.ph ... _to_see_it
  10. (And I ended up replying to the post in the wrong section too - moved post here.) Telling you exactly how to fix this would mean one of us basically rewrites your code for you and you would learn nothing. Instead, here are a couple of pointers to help you in the right direction: You're creating a new GUI Window everytime you enter the car. Obviously, this is not the best method. Have a seperate function that creates the GUI window and sub-elements on client resource start instead, and use guiSetVisible on the GUI Window element in onClientPlayerVehicleEnter/onClientPlayerVehicleExit. function createGUI() Panel_Window = guiCreateWindow(751,159,174,123,"VEHICLE PANEL",false) guiWindowSetMovable(Panel_Window,false) guiWindowSetSizable(Panel_Window,false) ... end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),createGUI) Speaking of which, my 2nd point is to use onClientPlayerVehicleEnter instead of onClientVehicleEnter, as it will fix your 1st bug: addEventHandler("onClientPlayerVehicleEnter", getLocalPlayer(), --bind to just yourself entering a vehicle function(theVehicle, seat) --this event passes the player as "source", not the vehicle guiSetVisible(Panel_Window,true) ... end ,false) --propagated false as you only want the event to trigger for yourself addEventHandler("onClientPlayerVehicleExit", getLocalPlayer(), function(theVehicle, seat) guiSetVisible(Panel_Window,false) end ,false) Try implementing those for now, see if you can get it to behave better. Once that's done, if the labels still don't update properly then it can be looked into when we know the GUI window is behaving.
  11. Sounds like you have the wrong version of MTA installed. You should be using MTA 1.0, downloaded from one of the mirrors on the front page.
  12. http://www.canyouseeme.org/
  13. subenji99

    Bikeskill

    use '/register [nick] ' first, or 'addaccount ' in the console window. All this info is in the wiki.
  14. Read your router's manual. We're not psychic, we don't know what router you have or how it is configured.
  15. Try DMZ first - if it doesn't work with DMZ on then no amount of forwarding ports will help.
  16. https://wiki.multitheftauto.com/index.ph ... _to_see_it
  17. http://code.google.com/p/multitheftauto ... loads/list official resources package, updated almost daily. https://community.multitheftauto.com/index.php?p=resources Third-party resources community, though there isn't a version of mabako-services for 1.0. You may have to contact him for an updated version if he's still interested.
  18. I said modem, not router. Good chance it's a port forwarding problem. If you actually cannot connect directly to a modem (e.g. you ahve one of those modem/router combinations) try setting your PC in the DMZ on the router then try.
  19. All of you need to try with a direct cable connection to your modem and all firewalls turned off before you start saying there's a problem with MTA. Hundreds of people (at least) have no issue connecting whatsoever so I'd put money on a firewall/router/port forwarding/spyware issue.
  20. The Visual C++ installer contains both 32-bit and 64-bit binaries in it, and when it's run, if it detects you already have it it will just exit. Let it do its job. (By The Way, Vista 64-bit here, works fine.)
  21. That's exactly what that error is saying. setCameraFixedMode no longer exists in 1.0, which the util function toggleCameraFixedMode was using, so you're using the DP2.3 freeroam resource. Do a clean install - delete your MTA folder, then install. If you don't want to reinstall everything, just delete your server/mods/deathmatch/resources folder, and then replace with the downloaded resources pack. As of this post, that is: http://multitheftauto-resources.googlec ... s-r460.zip
  22. Impatient much? 3 possible causes I can think of: You installed "Client Only", not "Client and Server" on installation. Reinstall, and choose "Client and Server". A firewall, blocking your own PC from connecting to a server on itself. Try disabling your firewall and see if it works. If so, you need to add an exception. and most unlikely, a corrupted/malformed hosts file, that doesn't contain "localhost". Many anti-spyware solutions will repair your hosts file.
  23. Sebas fixed the high CPU Usage bug. We are using it as a echo/server-to-server relay and it's working well for us. Random crashes aside.
  24. I found the animation speed is directly tied into your framerate - which makes sense seeing as it's a dxScoreboard tied into onClientRender. At 60FPS, the animation is fast and sweet but at 20 FPS it is obviously a lot slower. While no doubt adjusting the animation lines will be a pain I'm guessing an adjustment based on getTickCount deltas should be used instead.
  25. subenji99

    Hi i need a file

    Reinstalling MTA 1.0 would be the easiest way of restoring this file.
×
×
  • Create New...