Jump to content

Mr_Moose

Members
  • Posts

    866
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Mr_Moose

  1. Use the following functions and event handlers: setCameraTarget addEventHandler("onPlayerWasted") And a timer to respawn the player somewhere else after a certain time. setTimer spawnPlayer Also, don't forget to set the camera target back to your own player on spawn.
  2. Try this: http://games.albonius.com/index.php?topic=242.msg697#msg697 -- All gates and their data gate = { -- ObjectID closeX closeY closeZ openX openY openZ rotX rotY rotZ colX colY colZ colRad Group Scale [1]={ 11327, 1587.7, -1638.4, 14.8, 1587.7, -1638.4, 20, 0, 0, 90, 1588, -1638, 10, 10, "ISA", 1 }, [2]={ 10671, -1631, 688.4, 9.587, -1631, 688.4, 20.187, 0, 0, 90, -1631, 688, 7.187, 10, "ISA", 2 }, [3]={ 11327, 2334.6, 2443.7, 7.70, 2334.6, 2443.7, 15.70, 0, 0, -30, 2334.6, 2443.7, 5.70, 10, "ISA", 1.3 }, [4]={ 11327, 2294, 2497.4, 5.3, 2294, 2497.4, 14.3, 0, 0, 0, 2294, 2497.6, 4.3, 15, "ISA", 1.2 }, } -- Global data members gates = { } cols = { } ocpenSpeed = 3000 -- Add all gates function mapLoad ( name ) for k=1, #gate do -- Create objects local gat = createObject( gate[k][1], gate[k][2], gate[k][3], gate[k][4], gate[k][8], gate[k][9], gate[k][10] ) local col = createColCircle( gate[k][11], gate[k][12], gate[k][13], gate[k][14] ) setObjectScale( gat, gate[k][16] ) -- Assign arrays of object pointers gates[col] = gat cols[col] = k -- Add event handlers addEventHandler("onColShapeHit", col, openGate ) addEventHandler("onColShapeLeave", col, closeGate ) end end addEventHandler ( "onResourceStart", getResourceRootElement(), mapLoad ) -- Gates open function openGate(player) local ID = cols[source] if isElement(player) and ( getElementData(player, "Group" ) == gate[ID][15] or getElementData(player, "Group" ) == "ACRP" ) or getPlayerTeam(player) == getTeamFromName("Staff") then moveObject(gates[source], ocpenSpeed, gate[ID][5], gate[ID][6], gate[ID][7] ) end end -- Gates close function closeGate(player) local ID = cols[source] if isElement(player) and ( getElementData(player, "Group" ) == gate[ID][15] or getElementData(player, "Group" ) == "ACRP" ) or getPlayerTeam(player) == getTeamFromName("Staff") then moveObject(gates[source], ocpenSpeed, gate[ID][2], gate[ID][3], gate[ID][4] ) end end
  3. Definitely, if not it's easy to upgrade but the risk of overflows there is minimal. Good luck.
  4. Mr_Moose

    Ports Proplem

    Which solution did you tried? Port forwarding between routers and then the server isn't idealistic, I don't even know if that works or not, connecting the server directly to your first router on the other hand will work if port forwarding is correctly configured in there. You may also check your firewall settings on your local computer. Depending on which system you're using it works differently but most systems has a built in firewall by default. Windows 7 and 8 attempts to add an exception by default but it's still a good idea to check those settings anyway.
  5. For the MTA server only I would recommend 128-256MB RAM, MySQL won't use much on Linux, the distribution itself can be as efficient as 50-100MB RAM so in total, find a computer which has 512MB RAM or 1GB and install a small Linux Distribution like crunchbang which is based on Debian but will only use 100MB RAM for the system. The swap file will handle overflows on the ram without having to worry about lag in there either, Linux are pretty good at this generally.
  6. Mr_Moose

    Ports Proplem

    You must use port forwarding as usual, with two routers you point the ports from the first router which is directly connected to the internet to your second router, from the second router you do a port forward to the computer where your server is hosted. Not sure how efficient this would be, the best thing you could do would be to connect the server to your first router for immediate internet access and simple port forwarding. I assume the first one is used for TV and IP phones within your network, that should be able to handle a server as well.
  7. Depends on your os as well, Linux is generally better since you can chose a distribution with lower ram usage than windows, (50-100MB) The server itself uses the same (50-100MB) 40-100 slots full server default freeroam configured. As crismar also said, it will mostly depend on what you want to use the server for, what gamemodes you plan to run etc. Haven't actually seen any big difference in ram usage regarding player slots unless you use unrealistic high player slots limits such as 4096.
  8. It shouldn't be any problem, another thing you may try is to upgrade to the latest version 1.4 seems to be officially released now. https://forum.multitheftauto.com/viewtopic.php?f=31&t=78447
  9. Of course it does, maybe not 100% out of the box but it's still useful to look into and for learning purpose.
  10. You could try to navigate to: "C:\Program Files (x86)\MTA San Andreas 1.4\mods\deathmatch\resources" and see if your resource is in there. Disconnect from your local server and remove your resource from above directory, refresh your server resources and connect again. CRC mismatch are, just like the name says mismatched resources. Not fully sure about this but it's a good idea to try it out, if it works it sure is a good idea which let your players enjoy the game while downloading too.
  11. First argument of function kill is "Player" but it's not necessary a player element, it's the element that hit's your pay marker and due to that this element can't be in the kill marker. This part is correct: if isElementWithinMarker(player, killmarker) then killPed (player) end but you have to replace player to the players inside the kill maker in order to make it work, the easiest way is probably to loop through all players and check who's in the kill maker like this: for i, p in ipairs(getElementsByType("player")) do if isElementWithinMarker(p, killmarker) then killPed (p) end end
  12. Packing the resource in a zip archive may reduce the size a bit too if you haven't done it already.
  13. There are many ways to implement such as solution, I assume that you're looking for a GUI with a list and some communication between server and client for preview and stuff. You could take a look at this: http://code.albonius.com/?action=download&id=8523e282173778cc46739ae4405d3784 (Police, law job with GUI and skin selection) or maybe this: http://code.albonius.com/?action=download&id=6da85f73be5914342a14abed0e7921a5 (Entire job system with skin selection from GUI and asynchronous preview visible to the client only).
  14. Mr_Moose

    Ports closed

    The firewall will try to add exceptions automatic on modern windows systems, in this case however it might be your router (if you have any). More info about port forwarding can be found here: http://portforward.com/
  15. navigate to mods/deathmatch in your server directory, open "mtaserver.conf" and scroll down to the bottom where a list of resources that should start with the server are available, simply add your resources to that list (see the other resources for syntax), save and restart your server to make them start with the server.
  16. The MTA server won't use more than 100MB ram in it's standard state with default resources, depending on the quality of the resources running on it there is absolutely no problem to keep it around 100-200mb RAM even with around 100 player slots and a full server. (Only a few servers reach a player amount higher than 100). The only thing that takes around 500MB RAM is windows itself and some badly optimized Linux distributions, with those specifications you could as well host by yourself using an old computer and a light Linux distribution like crunch bang which only takes 100MB RAM to run, giving you 900MB for your servers. Linux are also better on the swap files. You can have up to 500MB RAM stored data in the swap (on the hard drive) as well without even noticing any lag. I have been hosting multiple servers with that os on a 15 years old laptop without lag so I know what I'm talking about. It's all about optimizing the software.
  17. The server itself doesn't need either installation or uninstallation, you just copy the files anyway so just deleting them should be wise enough. I'm using crunch bang which is based on Debian but without useless stuff that waste performance, should be the same on all Linux systems.
  18. By adding these thre lines you just removed again, then look at them carefully one or more times until you understand that the problem isn't the lines but the logical statement which returns the opposite result. for i, d in ipairs ( getElementsByType 'player' ) do if d ~= localPlayer then isRendering = false
  19. Wasn't it /getpos to see your current position in chat box and /setpos x y z to set it. Show your code.
  20. You might have to use some kind of nametag system which calculate the screen position from player position in game, the race resource has a script like this included and I think I have one as well, can't access it currently thought. It's just 10 lines of code and some math on top of that but basically you'll use dxDrawText and get the position from a function who's name I forgot.
  21. getElementData(vehicle, "owner") Should return the name of the player who spawned the vehicle. More information about usage may be found here.
  22. Mr_Moose

    TeamSaver

    Exactly, I assume this is what you wanted to do since you rejected the idea of handling the special case at login.
  23. How many player slots do you need? I might have some space over on server3.
  24. If the server says your ports are open then they are open, it also depends on your local firewall and route port forwarding configuration, if you're unsure you may ask a friend who is connected to another network to connect to your server and see if it works, if it works then you probably did the configuration correct.
×
×
  • Create New...