Jump to content

LonelyRoad

Members
  • Posts

    116
  • Joined

  • Last visited

Everything posted by LonelyRoad

  1. Let's see the original code, and the code you edited. Also, try to be more detailed, spend time writing your posts, else you make it take longer because people fail to understand what you're trying to say. What problems are you getting? The script ceases to work at all, or just the peace you edited doesn't take any effect?
  2. Mini, they probably aren't. But even in an MSN chat with somebody you don't know they'll more than likely have you as the last person on there list to respond to. You're better off reading lua.org/pil and wiki.multitheftauto.com for some examples, look at the snippets for common events and functions (Event = onPlayerChat or onPlayerSpawn for instance || Functions = getPlayerFromName or getPlayerName) and constructing simple things, then post them here on the forums and wait for one of the 'Scripting Gurus' to come look over it and help you out. Some notes: -Check your indentation -Make sure you understand the language -Learn the language structure (The way it's written) -Learn Lua Tables (They're useful) -Remember everything you do (or pretty much everything) has to be inside of a function. (Except initializing tables etc, that can be outside.) ^There's a lot more to it than that, but it's something to get you going.
  3. Solid, it's irrelevant here to your question, but read your code more carefully, specifically line 6 and think about how it would work. Regards.
  4. Slightly irrelevant but it's a pointless check on line 4 (In the original post) since the only command handler you have is pay.
  5. I understand his problem, well, sortuv... I assume you mean that you have a list of players in your admin GUI and you can see everybody, but your other admins can't? Without seeing the lua code we really (or most certainly) can't help you.
  6. Call a MySQL query and store the (boolean?) output to a variable, then use an if statement to check the value of the variable, basically you need to ask the DB if the character name exists, if it does then you assign one function to the button, if it doesn't you assign the other.
  7. I'm not sure on your intentions but that to me is way too many levels. You only need 5 at the max in my opinion. I have written the script and uploaded it here: http://www.mediafire.com/?r79ia8kkpsj5cj4 (PLEASE ENSURE YOU RUN THE TOP 9 LINES OF script.lua BEFORE MAKING USE OF IT) It's written to include: Admin (Labelled as Head Administrator) Super Mod (Labelled as Lead Administrator) Mod (Labelled as Super Administrator) Level 1 (Labelled as Administrator) Edit 1: Decided not to comment it now, it's probably something that you wouldn't manage to do correctly (No offence, but is quite a simple script to write.), just contact me if you need anything extra. (Can't guarantee I'll always help and respond, I'm already a scripter for a community with 3 servers in MTA.) Regards. PS: Where will this script be used? (PM me the IP address to the server.)
  8. Hey guys, I was looking to get some help with something, I want to know if the race gamemode calls an event when map voting starts. Also, I would like to know if I how to check onPlayerChat for numbers 1-9 and if it contains that, to replace it with an X or something like that. Regards.
  9. PM me the list of ACL groups that you have, IE: Owner Super Admin Admin Moderator BlaBlaBla And I'll put something together for you. (I've already written something similar to this, just not released it.)
  10. Did you fail to read 50p's response? He just explained what was wrong, and he told you a better way to write your function. Also did you even enclose this in a function block? IE: function YourFunctionName (YourFunctionArguments) -- In this case there is no arguments, source is a hidden paramater that always returns the name of the element that called the function. -- YOUR CODE HERE end
  11. i think so.. good idea is not to giving random advices when you dont know how to solve problem My understanding of it is vague, I just assumed that used in the right way that one could easily check if any of it's values exist. You've enlightened me nope, but i can write a generator for it Get writing then
  12. what is this? afaik this will be true you mean table maybe? anyway 'te' was an example.. wanna do the same for: iamveryluckyman ? ;p Did I just fail that bad? Fuck tables I haven't done that shit yet. iamverysillyman <-- You wanna do that one?
  13. I guess an easier way for him to do this is define a variable IE: local typesofletter = "te" or "tE" or "Te" or "TE" I think that's all the types...
  14. LonelyRoad

    area 51

    If you looked enough then you'd find it all over the place. It's a simple script I'd guess... Making use of the following commands: For your gate to be created: https://wiki.multitheftauto.com/wiki/CreateObject To move it open and closed: https://wiki.multitheftauto.com/wiki/MoveObject To make it happen after 5 minutes: https://wiki.multitheftauto.com/wiki/SetTimer
  15. This seems to me like it is based on apt-get... But, I don't see why you've posted it here without any sort of link or something? Give more information, a featurelist etc? And ofcourse it's possible to use pictures in MTA (Depending on the file format), this is proven fact as a lot of race servers have there own logos etc.
  16. Hey guys, I understand some MTA Lua now so I can make it for myself normally, but this one has me stumped, basically what I want to do is check onPlayerConnect if the player has a space in their name, and if they do I'd like to replace it with an '_' Hope you can help! Regards.
  17. -It currently only works with full nicknames, and doesn't work if theirs a space in the nickname as their is currently no nickname completion, I intend to implement that ASAP. (I'm new to scripting) -Well, I might look into a GUI but I don't think it'll benefit much, but it seems to be a popular request so I'll review my thoughts on it. -Tab list isn't such a great idea IMO, what if somebody uses a custom scoreboard? It wouldn't be linked then. Keep the suggestions coming though!
  18. NEW VERSION RELEASED - 0.4 The script is fully commented, allowing anybody new to LUA to read the comments and see how the script works. The script now works with both "/pm" and "/privmsg". The script now has an Anti-Spam system built in (UNTESTED - PM ME IF YOU HAVE ANY ISSUES) -- CONFIGURABLE AT THE TOP OF THE FILE PM.LUA IN THE CONFIG BLOCK. Happy PMing! Note: I decided against going for a gui based system for another release, I find PM GUI's quite intrusive, and in RP(G) servers and alike they can be heavily abused to prevent proper gameplay.
  19. Hmm, and that's what I explained in my post. Daniels...Again? I don't ever stop bumping into you do I... ^What server you playing at now or w/e?
  20. LonelyRoad

    NEED FAST HELP!

    ^WRONG! ^His second post, read the first piece. Sorry, can't help you here but I had to show him up on that one...
  21. getPedOccupiedVehicle doesn't know what source is, you, for that matter, the entire function doesn't know what source is. You need to do something like local player = getPedOccupiedVehicle(sourcePlayer) getVehicleColor(player) or function SetCarColor(sourcePlayer) -- Or GetCarColor, depends what the function is doing. getVehicleColor(sourcePlayer) You need to study the basics of creating functions and depending on what your code is doing is how you know what arguments to give to the function.
  22. Yes, I know. Off-topic: Your 14 years old and you love the MGS series, a good conclusion, yes?
  23. The code in the post above will work, but only if they're in a car AS SOON AS the player logs in (which has a really slim chance of being possible by common practice, as if the player has any reason to login they'd do that first. unless you make your own event (if you use a custom login system) and trigger it when they login.) It will also only work if the car has two colours (which most don't).
  24. Any ideas guys, this is a big inconvenience.
×
×
  • Create New...