Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. 50p

    Private Message

    Just send the player name to the server and let the server take care of getting player element from his name. You say you get an error but you didn't say what is the message of the error. What is it? EDIT: Do NOT double post unless you have good reason. Be patient and someone will reply. It's not a chat channel... it's forum.
  2. Debug the script by showing some messages, eg. outputChatBox( tostring( engineState ) ) to see what getVehicleEngineState returned.
  3. 50p

    Dashboard

    Every GUI element accepts onClientGUIClick event. That means you can create any GUI element and use onClientGUIClick event to do something when GUI is clicked. Use bindKey function to bind a key to specific functions, so that you can bind key to do something like in your case showCursor.
  4. 50p

    Does anyone know

    You shouldn't make a table like this: tablename = { ["string"]=true, ["string"], ... } -- just do it this way: tablename = { "string", "string" } Then just loop through the table and check if any of the words match. Use string.gmatch or string.find.
  5. Does the button change when you hover over it? I mean the frame, text colour? Don't you get errors/warnings when you click on it? You must have screwed it yourself because nobody complained about bank for long time and this "bug" is very serious so I would have been told about it soon after release.
  6. Because working with GridList is annoying, I recommend you the GUI Classes I made the other day. There are some examples there how to use it. I'm sure you'll understand it. Then, you can just get the text of selected item in the grid list and spawn player somewhere where he wanted.
  7. Which message do you see in your chatbox when you try to stop the engine?
  8. What do you mean you can't click anything? Your cursor doesn't move? You don't see it at all? I can't believe there's thousands of downloads and you're the only one who can't click anything. You must have messed up something.
  9. Why did you not say you messed up with bank.locations.xml? It didn't start happening when you started server, it started when you modified the .xml file. Re-download the resource and replace bank.locations.xml.
  10. Give more details please, like what you did before you entered bank? What version of MTA are you using?
  11. From what I see, it will be very hard for you to understand all this scripting but if you really really want to learn, you need to focus on Lua syntax first. As you can see you code here has lots of red colour, look at the function names (starting from triggerClientEvent), they are all red because you didn't finish your string with " (quotation mark). You must get errors in the console, I'm sure of this. A question, why do you add new OnClientResourceStart event? Here are some links for you to learn from: - http://www.lua.org/manual/5.1/ - http://www.lua.org/pil/index.html - http://lua-users.org/wiki/ (you may not need this one really) - http://development.mtasa.com/index.php? ... troduction
  12. You need to debug the script. Go step by step where the code goes and try to find out why it doesn't work. The previous code looked ok and your current code probably too. The thing is that when code looks fine and you get no error messages you need to trace what cause the problem by printing some text to chatbox, console or debug window. For instance, AFTER you getPlayerSkin, use outputChatBox( tostring( skinID ) ) to find out if the skinID returned a value (as you expected), then AFTER getVehicleID output some text what vehID is (the same way with outputChatBox or any other output functions). Hope you will try to debug it yourself.
  13. 50p

    send

    Using outputChatBox of course. If you read carefully what each parameter does in this function you will find out that there is a parameter called "visibleTo". The message is sent to an element and its children. If you want to learn then read tutorials which are on the wiki and take a look into other resources.
  14. Why do you want to kick players out of the car? It's better if you don't let them go inside using onVehicleStartEnter. I recommend using brackets even if they are optional because in an if statement you may get unexpected results.
  15. 50p

    send

    Honestly, I have absolutely no idea what you're asking about. What do you want by saying "only appear text on chat.. not send message"?
  16. Use winamp, host your radio station and ask people to listen to your radio. C'mon your ideas go beyond MTA.
  17. 50p

    SQLite Problem

    Try to use "SQLite Database Browser" application to create databases, tables inside of databases, records, etc. Maybe your database created with firefox' extension fails.
  18. @Grievous Do not use triggerClientEvent in onPlayerJoin event! When you do, it will try to triggerClientEvent but player has to download the files before you can trigger client events, so that will result with error message and no window showing up for the new player. Use onClientResourceStart - this event is triggered when resource starts for client, that is when played will have all the files it will be triggered for him.
  19. Q: #6 A: You need to check if they are already registered using Account functions - http://development.mtasa.com/index.php? ... _functions If you want to register players using GUI then you'll need Event functions, to trigger server-side events and GUI functions - http://development.mtasa.com/index.php? ... _functions - http://development.mtasa.com/index.php? ... _functions - or https://forum.multitheftauto.com/viewtop ... 91&t=24122
  20. You questions are more like modding GTA questions not scripting. Go to GTAForums.com - Modding category and try your luck there. You can replace models, whether you can replace models from other games is a question you will be answered on gtaforums.com Radio stations can't be modified in MTA, you can make your own radio stations by using playSound function.
  21. This function never worked correctly. Even if you change the state and function returned true, you may not see its results. There is nothing wrong with your code but make sure you use onResourceStart event instead of using none.
  22. 50p

    Jump Plus.

    To make it available for players only once/sec then make a timer that changes their data eg. "allowjump". me = getLocalPlayer(); function onCarDownResourceStart(resource) setElementData( me, "allowjump", true ); bindKey("lalt", "down", jump ) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onCarDownResourceStart) function jump(player) if( getElementData( me, "allowjump" ) == true ) then -- can player jump? local vehicle = getPlayerOccupiedVehicle( me ) local velx, vely, velz = getElementVelocity( vehicle ) setElementVelocity( vehicle, velx, vely, velz+0.3 ) setElementData( me, "allowjump", false ) -- disable jumping setTimer( setElementData, 1000, 1, me, "allowjump", true )-- this is the key... allow them to jump after 1sec. -- ... end end
  23. That's a good idea. I thought of right-clicking them and "Add path to code" but dragging them would be even faster but even right-clicking them hasn't been added yet. If we won't get on time, we'll try to add it and release a patch. EDIT: Added and works fine But it needs some tweaking, I haven't implemented the feature of smartpaths, yet. It just inserts the path of the file (which is in meta.xml) into the code, even though it looks nice. It does support smartpaths now. I only added support for image and sound files but I'll add more file types pretty soon.
  24. BUMP! Updated changelog and added information about our IRC channels (in overview section).
  25. Yes, but his face still looks too nice for a handsome zombie Also, put some darker blood on him so that blood looks a bit dried and don't forget about his back (if you haven't done anything to his back yet).
×
×
  • Create New...