-
Posts
866 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Mr_Moose
-
How much money you pay for this internet? ~$150/month and ~$90/month first year, many ISP's can deliver 1Gbit/s here so they are forced to lower their prices.
-
What errors did you get this time?
-
You could use the PHP SDK to communicate with a php script on your webserver, and that php script would basically get the information from a website like http://www.whatsmyip.org/ or similar ip to location service, all you need is your clients ip.
-
You must handle the case when a vehicle hit's the marker, your first script would only work for player elements. This should solve your problem. Zona = createMarker(1540.8887939453, -1630.9000244141, 12, "cylinder", 20, 255, 255, 255, 0) function Funcion (source) if isElementWithinMarker(source, Zona) then local playerTeam = nil if getElementType(source) == "Player" then playerTeam = getPlayerTeam ( source ) elseif getElementType(source) == "Vehicle" then local occupant = getVehicleOccupants(source)[0] playerTeam = getPlayerTeam ( occupant ) end Clann = getTeamFromName ( "Police" ) if ( playerTeam ) == Clann then veh = getPedOccupiedVehicle(source) if (veh) then moveObject ( objeto, 3000, 1541.0999755859, -1627.6999511719, 9.4 ) else moveObject ( objeto, 3000, 1541.0999755859, -1627.6999511719, 9.4 ) end end end end addEventHandler ( "onMarkerHit", Zona, Funcion )
-
planned "open development" project for a new gamemode
Mr_Moose replied to LonelyRoad's topic in General
GitHub for the source code is an obvious choice, about MySQL I'm using this. It saves all login details encrypted on your local PC, handles multiple databases and makes it just as simple editing databases as working on a regular Excel document, it's a powerful tool which you use at your own risk, it won't stop you if you try to remove the entire database for example -
Whitespace would have the same effect as regular space, it may look nice in the code editor where the font is courier or monospace, (all letters has equal width), the problem is that even if the layout looks nice in the code it won't be a straight vertical line in game (with a different more nice looking font), of course there are other solutions like changing the layout of the text or use courier or moonscape fonts for example but I can't really see why it should be any difference in lua compared to kind of all other languages where you can make nice looking table structures using '\t'. outputChatBox("test1\ttest2") This appears to produce the same result, '\t' is just ignored, there might be a reason for it in some cases but somehow it must be possible to solve.
-
Nope, that will only remove the '\t', I'm looking for the same effect you get in other programming languages like C, where '\t' is converted to an indentation.
-
I got a GUI memo which loads it's text from a data source similar to this: local text = [[Long text document here... value property value2]] Now, the problem is to make the indentation to the word 'value' equal on both the lines (using a non courier font), usually '\t' would have solved this, but in this case it only outputs '\t' as in it's source. Inserting and justifying with space doesn't work either since the vertical lines never get's straight. Any ideas or alternatives to '\t' in lua?
-
It's open source, all of it. Images can easily be replaced or removed as well.
-
This is probably what you're looking for: https://community.multitheftauto.com/index.php?p=resources&s=details&id=7255
-
These functions will solve #1 local sizeX,sizeY = guiGetScreenSize() -- Get the size of a client screen fadeCamera(player, false, 0) -- Make the screen black and this will solve #2 sizeX/2 sizeY/2
-
Which one? What you describe sounds like a shader, I might have seen one in the community if that's what you're looking for. "radar_icons" or something like that.
-
Of course it doesn't work, you need to unbind the function that was bound inside your compiled script. Try to remember it's name.
-
That won't disable the keybind, only the function you just made. Use unbindKey, inside a new file that loads after your compiled file in your resource.
-
@King12, That will work just fine: https://wiki.multitheftauto.com/wiki/OnPlayerCommand
-
You can't request stuff here, see this board: https://forum.multitheftauto.com/viewforum.php?f=177, and btw ~70% of what you want is already written and published as open source here. Hope you'll find what you're looking for.
-
function setCameraOnPlayerJoin(thePlayer) fadeCamera(thePlayer, true, 1) setCameraMatrix(thePlayer, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end addCommandHandler("fade", setCameraOnPlayerJoin) That will solve the problem.
-
It does work, but you'll have to wait 1000 seconds before the fading is finished, that's almost 17 minutes, and it would probably take at least 100 seconds before you actually can see a little bit of what's hiding behind the darkness.
-
Xeon is right, I made the same mistake, should have read the wiki page immediately instead, in fact, the example in there is a cancellation of the event. https://wiki.multitheftauto.com/wiki/OnVehicleStartExit
-
Cancel event's has to be done client side, at least it works for event's such as weapon fire, logically this should work. addEventHandler("onVehicleStartExit", root, function() cancelEvent() end) Edit: Use "onVehicleStartExit", https://wiki.multitheftauto.com/wiki/OnVehicleStartExit
-
In SMF forums, you can specify a custom width and height directly in the img tag, but it doesn't work with phpbb, however adding this: .postbody img { max-width:100%; } in the file: "common.css", will scale any image, as lopezloo suggested. Imgur also has a feature to create a thumbnail which fits pretty good in a post here, however since you're not hosting the images yourself, large images won't affect the performance in this forum anyway, it's much easier for the end users with automatic scaling.
-
Show the code you wish to edit, otherwise we can't do more than suggest the functions you need to write that feature. What game mode the script is or which key you use to show it's GUI doesn't give any relevant information.
-
Thought I mentioned the performance of my test system in this tutorial which is relatively equal to a raspberry pi, my testsystem was a 15 years old laptop running Linux Debian, beside the MTA server there was also a CS 1.6 server and Cod 4 MW server running at the same time, including web (apache2), ftp (vsftpd) and remote desktop (xrdp) running on it. All that made it act like an external host (VPS), if that can handle all those servers with ~20 players on each game server then a raspberry pi or a Cubieboard 3 wouldn't have any problem doing the same thing. Thanks for the tip, those would probably also be cheaper than an old PC to maintain.
-
Either change it's handling properties (not sure which one or if it's possible), or using the mod features to replace an existing railroad vehicle like tram with the model of the utility van. A third option which isn't the most elegant maybe but it will work, is to spawn a tram, make it invisible and attach a utility van to it, by using key binds or a timer you can check if the player in the utility van is driving forward or backward and force the tram to do the same, I used this method to make a script to attach two trailers to the same truck like a road train, so it does work but it's not the most elegant solution to be honest.
-
You can check that an element still is inside the marker with this function, the "source" of your "onMarkerHit" event is the marker element you pass as argument into this function. bool isElementWithinMarker ( element theElement, marker theMarker )