Jump to content
  • Posts

    65
  • Joined

  • Last visited

Everything posted by [email protected]

  1. Agree with that, you probably don't want players to create their own vehicles, because your server will end up being flooded with vehicles that way.... What we did at The Fun Server was mainly to create a new gamemode and copy over some commands from broph, but the map spawning and additional functionality was custom built by us. These resources also aren't available publicly, since we're still developing them currently.
  2. I thought this was a scripting forum and not a download area, anyway: "start broph" in your server console, it's a standard resource which is probably expanded by custom-built resources.
  3. Script to reproduce the issue: http://www.colips.nl/files/setregistercrash.zip
  4. In response to eAi: I had some trouble with the set() function to store data in the settings register, making the server crash (posted in bugs). I uploaded a very brief script that does exactly this, to reproduce the problem. Simply load it into the server (works fine) and start it (= crash) link: http://www.colips.nl/files/setregistercrash.zip
  5. You may also have a look at http://development.mtasa.com for the correct function specifications
  6. bindKey ( v, "l", "down", "Lights on/off", toggleVehicleLights ) The syntax of that function is incorrect, the bindKey() function takes the arguments as follows: bindKey ( player thePlayer, string key, string keyState, function handlerFunction, [ var arguments, ... ] ) Therefore, you should change the code in the codeblock to: bindKey ( v, "l", "down", toggleVehicleLights, "Lights on/off" ) And yes, this was also wrong in fr.lua (look at the one in your playerjoin event function, that one is correct).
  7. The reason why they do not spawn is, that the function doSpawn() requires the argument "thePlayer". By calling this function on player join, you do not supply that argument, and therefore the function doSpawn() doesn't know which player it has to spawn.
  8. It's possible to check the real server time, and use setTime() client-side, when the event "onClientRender" is triggered. The reason why that is a bad idea is that the game engine messes up screen drawing when setting the time. Doing this on every frame render makes the client's screen flicker really badly. Doing this every 500 or 1000 miliseconds is possible, but again the flickering is really annoying.
  9. Hi, I was wondering how MTA handles server-sided objects exactly, and whether it could be possible (though very complex to create perhaps), to create objects that have some form of physics (like when you hit it softly with a car, that it moves a bit away; like pushing a glass off the table, where the glass is the object in question). My idea about that was, to have some sort of multiplayer-mission-like gamemode, in which several teams have to load a truck with cardboxes as fast as possible, using forklifts. The issue is that, creating cardboxes (object ID 1230), cannot be moved once created, by the forklifts. When they get a lot of damage (driving into them with a car very fast, they will collapse though. I have been thinking of making the object move, once it gets hit by they forklift, but it seems quite complex to simulate physics that way ofcourse, and specially dirty, when the engine that does the job is there already. So the question is: Does anyone have suggestions or tips on this idea?
  10. Not sure, but does it help if you replace: engineReplaceModel ( engineLoadDFF ( "blokje.dff", 0 ), 3374 ) with?: engineReplaceModel ( engineLoadDFF ( "blokje.dff",[b]3374[/b] ), 3374 )
  11. Hey, not a response to your question, but I just want to note you on the fact that I am working on a script that enables dynamic object creation in-game, by creating objects at a player's cursor position. (want to add drag-and-drop for in-game object moving (click an object and drag it to s different place, by moving your mouse over the screen), but that take some time to create, since I got my usual business also ) Anyway, if you would be interested to see what I got, feel free to contact me at MSN: [email protected]
  12. By the way, you can remove: if ( keyState == "down" ) and ( isVehicleOnGround( vehicle ) == true ) then end as it does exactly nothing at all , it checks if the keystate is equal to down and if the vehicle is on the ground.. and if that is both true, then it does nothing, because you placed an "END" directly after the "THEN"
  13. Hello, I have built a script that makes use of the set() and get() commands, to save and retrieve persistant settings on the server's end. This worked great during developer's preview 1 version of the server, but when I switched to dp2, it is causing a fatal server crash. Symptoms: -When storing data using set(), server hangs (windows is reporting that the server-program isn't responding anymore), using windows vista. -On linux (redhat-based system), the same thing happens, except the server crashes immediately. How to reproduce this: -Create a script that performs some actions directly when it starts up (onResourceStart event for example) -In this startup cycle of the script, put a set() command (with arguments ofcourse, for example: set("testdata", "this doesn't seem right does it?"), or store a variable, instead of the string I put there) -Make sure the script is loaded into the server (no problems there) -Start the script ---> CRASH The issue only occurs when using SET(), not when using GET() UPDATE: -The issue also happens when I manually remove the settings.xml file (to enforce the server to start with a clean settings registry) -The issue also happens when there is absolutely no other resource loaded. (I built a script to test the problem, containing 1 line of code (and ofcourse a metafile): set("testdata", "Does not look good :P") The server crashed directly when loading that 1-line script.
  14. I am not sure what went wrong, but it looks like vrdelay0.2 is crashing the server. The issue occurs for me on windows as well as linux, when I tried to load it on developement release 2 of the MTA server program. I will update this post when I figured out a bit more about this. EDIT: Found out that both my windows server and linux server crash, as soon as I try to use set("name", variable), I cannot set data in the settings register of the MTA server anymore, without having it crash. Using get("name") however does still work, or at least it does not make the server crash currently. I will report this as a bug also if no one has done that yet. Until then, please do not use vrdelay, until the issue is solved.
  15. I can probably make you this m8, just need some time for it, I'll hop by on your server from time to time for a chat
  16. Assuming this is a client-side script (server-side scripts do not support getLocalPlayer() ), then the script contains no errors. Seeing that the vehicle really did spawn, but cannot be used/destroyed... I think the problem might lie on the server's end. Perhaps the vehicle is only created client-side? (not sure how createVehicle() behaves in a client-side script, I always use it server-side) That would explain why the server can't interact with it.. Another thing can be that another script destroys the vehicle directly when it spawned (but not visually removing it) Either way, if this is a client-side script I see no errors in it.
  17. I have also been thinking about cars not being "visually" removed sometimes... I had a similar issue with 3d objects. For those 3d objects I found a way to remove them visually, client-side after they got destroyed. Perhaps that also works for the vehicles, will try this for the next version.
  18. As you can see, it is triggered, but you are using an unknown function called setGuiVisible in line 26. Happy coding, Jan (DracoBlue) also make sure that you added the event client-side (in your client-script: addEvent("event name", true), true needs to be supplied to make it remotely triggerable, by your serverscript for example )
  19. As far as I can see you did not post the code you have to destroy a vehicle... what are you trying to destroy it?
  20. Well, I think that is exactly what I posted around 3-4 posts above this one...: function isMe( playerObj ) -- get player account access... acName = getAccountName( getClientAccount( playerObj ) ) aclObj = "user."..acName -- retrieving all admin accounts... myAccount = aclGet("user.[b]myName[/b]") -- myName is your account username if( aclObj == myAccount ) then return true -- player's account is your account. else return false -- player's account is not your account end end Just replace myName, in "user.myName" with your account-login name (on your server). And in add a check in the script whether isMe( aPlayer ) returns true or not (aPlayer should be the player pressing the key then) I am not sure if this would work, but for example: function startup() [b] if( isMe( getLocalPlayer() ) ) then[/b] -- -- At startup, we'll bind the key. outputChatBox( "" ) bindKey( "b", "down", keydown ) outputChatBox( "" ) [b] end[/b] end This should only bind the b-key to a player, if that player is you (since it's a client-side script). Note: this only works if you are logged into your server-account, autologin should be enabled for that to work, but you can also do this check later in the script execution.. for example: when the key is pressed (this means in the function keydown() ) And.. why are you asking the same question in multiple topics? (see: viewtopic.php?f=91&t=21301&p=268892#p268892 )
  21. Confirmed by me also, on my windows server. Linux server seems to have less trouble with it though (no issues found yet there)
  22. for infinite calls use 0 in setTimer, and yes you can use colors function delayedChat ( text, showTo, r, g, b ) outputChatBox ( "Delayed text: " .. text, showTo, r, g, b ) end setTimer ( delayedChat, 1000, 0, "Hello, World!", getRootElement(), 255, 0, 0 ) You can also put the timer inside the function that is called by the timer itself, and call the function simply 1 time Then everytime the function is executed, it starts the timer again, which starts the function again, etc....
  23. Ok, now this I do not understand "een fair"? "only my nickname can be used to script"?, does this mean that only you can... use commands in this script or... what do you mean?
×
×
  • Create New...