Jump to content

subenji99

Members
  • Posts

    264
  • Joined

  • Last visited

Everything posted by subenji99

  1. https://wiki.multitheftauto.com/wiki/Filepath
  2. subenji99

    Anims

    I couldn't find the old news post about this, but I remember the content: They're removed (hard-coded disabled) on purpose. MTA Team don't want to get in trouble with Rockstar over their mistake and the whole Hot Coffee controversy, and also, anyone that has a newer version of SA and used a downgrader actually doesn't even have the Hot Coffee animation data installed in their copy - so all around, supporting them is just a bad idea. Besides, grow up.
  3. You probably chose the "Client Only" install. The map editor needs the server package installed. Just reinstall on top of your existing installation, with the "Client + Server" option.
  4. Update DirectX. Even if you already have 9.0c, you won't have the latest SDK Runtimes. Even if you have Vista, you still need to update DirectX 9. http://www.microsoft.com/downloads/deta ... laylang=en
  5. 5 minutes. a double-post within FIVE minutes. Find it yourself.
  6. "I think no client-side scripts will start until they're all downloaded. In other words, you can rely on onClientResourceStart to trigger a server event that spawns the player." This is correct. In fact, in my WIP gamemodes, I don't initialize a joining player with "onPlayerJoin", I use a system with a clientside file that triggers a serverside "onClientIsReady" custom event, and initialize the player then. Keeps things cleaner. For your situation, it's as simple as putting the player in jail with "onPlayerJoin", then with a clientside file, trigger an event that removes them from jail/spawns them properly.
  7. https://wiki.multitheftauto.com/wiki/Eve ... ent_source Read, and learn how events work. Especially the "source" hidden variable.
  8. I covered variable scope briefly when writing a quick guide to lua variables in another thread, but here, I was basically just referring to the MissionVehicle element variable had been made local to only his first function. https://forum.multitheftauto.com/viewtop ... 32#p298691 You seem to understand his code structure much better than what he has laid out in this thread, so I shall not help further for now. (I just cannot follow his code if he's not even explained what code sections are running client and serverside!)
  9. Your "Reward" function never gets called according to this code. Add an event handler line: function mission ( hitPlayer ) --if (source == marky) then my = createMarker ( -1647, 1219, 6, "cylinder" , 4, 255, 255, 0, 30 ) setElementVisibleTo ( my, hitPlayer , true ) addEventHandler("onMarkerHit" , my, Reward) ... and a removeEventHandler line: destroyElement( MissionVehicle ) destroyElement( blip ) destroyElement( my ) removeEventHandler("onMarkerHit" , my, Reward) givePlayerMoney(hitPlayer, 100000) also: local MissionVehicle = createVehicle ( 401, -2639, 1371, 8 ) MissionVehicle is local to your mission function - it doesn't exist in the scope of the Reward function. On a side note, people NEED to start learning how to properly attach events to elements. addEventHandler("onMarkerHit" , getRootElement(), mission) This will trigger on ANY marker (even ones in other resources), and because of that, you've added the line if (source == marky) then YET! If you just attached the event handler properly, that wouldn't be necessary at all, saving on performance and code efficiency: addEventHandler("onMarkerHit", marky, mission) Do NOT attach to the Root Element unless you KNOW you have to! Attach to the Element you are interested in, or the 1st Parent Element of all the Elements you are interested in.
  10. Other players that described a similar issue to this to our admins traced the problem to their router. Try using DMZ for a test, and see if it happens again. If not, you have a NAT/Port Forwarding issue. (Don't leave your PC in the DMZ though, it's meant for short-term testing only.)
  11. Solution is quite simple: run Freeroam, but not play. If your server is running, as admin: /stop play /start freeroam To set it up this way on starting your server, open mtaserver.conf, find and alter: <resource src="play" startup="1" protected="0"/> to <resource src="freeroam" startup="1" protected="0"/> Note that Freeroam is not a gamemode - so it will not load map resources, or report a running gamemode to game-monitor. You may want to make a small resource to run alongside to update the game-monitor settings.
  12. Well if you want to get better, you've got to learn to read! https://wiki.multitheftauto.com/wiki/AddEventHandler http://robhol.net/guide/basics/?p=8
  13. Sounds like you need to look at some basic Lua tutorials, but here's a quick and dirty variables 101: This is how you define a variable for example: someIntegerVariable = 42 someFloatVaraible = 3.14159 someStringVariable = "I am a string" aPlayerElementVariable = getLocalPlayer() and they are variables because you can change them at any time: setMyVar = 5 --Variable now contains 5 setMyVar = 7 --now contains 7, 5 is forgotten setMyVar = nil --destroys the variable, 7 is forgotten and setMyVar no longer uses memory Slightly more advanced, but I'd consider worth learning, is the local variable. Setting a variable "Local" restricts it's access to only the current block. (and children of) (a block is usually a function, or file if defined outside a function, or a if...then/end section - look at "scope" below) An example explains this easiest: (ignore load and execution order here, it's just for demonstration - assume all functions have run once) FileA.lua: myGlobalVar = true local myLocalVar = "a" function myFunction(var) functionVar = "b" local functionLocalVar = "c" --here, myGlobalVar == true, mylocalVar == "a", var == "e" (called from below) functionVar == "b", functionLocalVar = "c", --andAnother == nil (even if it had been executed, it's local to myOtherFunction only), var2 = nil (passed variables are local to their called function) end function myOtherFunction(var2) local andAnother = "d" --here, myGlobalVar == true, mylocalVar == "a", var == nil, functionVar == "b" (it wasn't local, so it's accessible), functionLocalVar = nil, --andAnother == "d", var2 = "f" end myFunction("e") myOtherFunction("f") --here, myGlobalVar == true, mylocalVar == "a", var == nil, functionVar == "b", functionLocalVar = nil, --andAnother == nil, var2 = nil FileB.lua: ... (code here) --here, myGlobalVar == true, mylocalVar == nil (local defined outside a function in the other file, local to that specific file), var == nil, --functionVar == "b", (assuming myFunction has been called before arriving here) --functionLocalVar = nil, andAnother == nil, var2 = nil Local variable names can use the same name in different scopes and they won't interfere with each other - e.g. you can have a local variable named 'local myVar' in 2 seperate functions and they won't overwrite each other. Variable scope extends further, you can only have one "Global" version of a variable, but multiple "local" variables defined by scope (nesting: functions, then - else/elseif/end, do - end,repeat - until) - a quick demonstration from the Reference manual: x = 10 -- global variable do -- new block local x = x -- new 'x', with value 10 print(x) --> 10 x = x+1 do -- another block local x = x+1 -- another 'x' print(x) --> 12 end print(x) --> 11 end print(x) --> 10 (the global one) You're not likely to run into a variable name clash though so I won't explain it further. Functions can be local too, and follow the same rules. Not sure how much all of that will be of use to you, but I tried to make it easier to understand than the lua manual.
  14. I'm going to be lazy here, but you really should learn why this works instead: function createRules() window = guiCreateWindow(372,198,820,611,"Rules",false) memo = guiCreateMemo(0.0463,0.0753,0.9146,0.7889,"",true,window) guiMemoSetReadOnly(memo,true) button = guiCreateButton(0.3085,0.8903,0.361,0.0949,"Accept",true,window) addEventHandler ( "onClientGUIClick", button, hideRules ) --cannot add an event handler to a nil element, so you add the handler here guiSetVisible ( window, true ) showCursor ( true ) --clientside showCursor only affects the local client, no player element to be passed end function hideRules() removeEventHandler ( "onClientGUIClick", button, hideRules ) --remove the handler before destruction of the element (shouldn't be necessary, but this is tidier) destroyElement(window) showCursor ( false ) --clientside showCursor only affects the local client, no player element to be passed end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), createRules) --"onClientResourceStart" attaches to resource root elements, attaching to Root would restart this script when ANY resource started - including maps
  15. I'm assuming you tried the timer, and it just occurred to me what it'll be DesertMusic = playSound("Music.ogg", true) setSoundVolume(music,0) See a problem there? setSoundVolume(DesertMusic,0)
  16. Must be some bug relating to a volume change before a single frame of sound has played - try either: 1. Using a Timer setTimer(setSoundVolume,50,1,music,0) 2. Pausing the sound instead setSoundPaused(DesertMusic,true)
  17. VRocker's IRC Module was never updated to work with MTA 1.0, so this script would need some MAJOR recoding to be compatible with the current available IRC module, SebasIRC. If anyone even still has a copy of it. Resurrection seems unlikely.
  18. https://forum.multitheftauto.com/viewtop ... 08&t=25488 Search. Preventing dumb topics since the dawn of search.
  19. Switching to "joypad mode (classic controls)" allows the right analog stick to control the camera instead of the mouse. And while it's true that only 1 function can be assigned to axes, you can bind several controls to the buttons - it's all set up on the "input" tab, not the "joypad" one.
  20. Also, onClientGUIClick returns what element was clicked on as the "source" hidden variable, so you shouldn't even require string.find at all for this task.
  21. Not to mention the Events: onColShapeHit onColShapeLeave
  22. https://wiki.multitheftauto.com/wiki/Ser ... nistrators
  23. subenji99

    Free Hosting

    I was actually going to mention price too, $5 a Week = $110 a Year. I thought that was too expensive, but then I checked delux-host's prices, and it's actually competitive. However, personally, I'd much rather use delux host, or another trusted hosting solution. After all, I don't trust having to pay to use Teamviewer when: 1. Teamviewer's site says the Program is free for viewing, 2. Other programs (RealVNC, LogMeIn, etc) are also free. Though I may be tripping up on licensing issues here.
  24. Testing race based maps does not work correctly from the editor. It is best to make your map without any race-specific elements first, and test that it works , then place the race stuff, save it (making sure to add race as a compatible gamemode), stop editor, start race, and switch to your map to test.
  25. subenji99

    Map Editor Error

    The problem is likely due to a "foreign" version of the executable. MTA generally only works on the US or EU versions of the GTA executable, as do the usual de-patchers. Though we can't link to it, search for "hlm-gsaeu" to find a compatible executable.
×
×
  • Create New...