Jump to content

50p

Retired Staff
  • Posts

    2,973
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by 50p

  1. Are you using a shader to replace the texture? Also, are you trying to replace the text texture or the plate design?
  2. Nice update. It looks great! Good work.
  3. First, you need to know how to script. Then you need to research the gamemodes and find out how they interact with players so that the gamemodes will not interrupt themselves. Then start modifying the gamemodes.
  4. In that case you first need to make gamemodes that work together. You can't simply run all the gamemodes you have on your server and make a selection window for this. You have to modify all the gamemodes to work as 1. That is a lot of work and string.find on its own will not make it all possible.
  5. He is trying to make something like "FFS Gaming" "Twisted Gaming" .. etc As what i understand . It doesn't explain anything. I still don't understand.
  6. 50p

    AI

    As you can see in the library example it uses require function. As far as I know, MTA blocks this function for security purposes. In case people would load IO libraries to get access to the server files (even worse, system files) for example. Peds are just entities that are controlled by script to give scripter full control over the peds. If you want the AI, script it. AI is a tricky subject and requires knowledge to find the best ways for peds behavior.
  7. What do you mean "gamemode race for lobby"?
  8. Nice to see someone finally use my sprite library! It was meant to be used for mini games like this one and simple animations. I'd like to see a video once you have the stuff moving :>
  9. I do need to write the code myself to work entirely inside 3DS Max. I don't want to export .dds from .txd, I simply want to read the data and create textures in memory out of it. I have tried quite a few libraries but none of them has code that is understandable, especially in a language that I can't write. I simply don't understand graphics programming in terms of graphical file formats. I even tried to read up on other file formats like .jpg, .png, .gif and .tga. It's a nightmare especially if you don't know where to start.
  10. You can use it to find substring (string inside) of the string. start, end = string.find( "Hello world", "wor" ) -- would return 7 and 9 (7 is where it was found, and 9 is where it ends) start, end = string.find( "Hello world", "hel" ) -- would return nil because "hel" is not found in the string start, end = string.find( "Hello world", "Hel" ) -- would return 1 and 3 (found "Hel" at 1 and ended at 3) You have to remember that the second string (the string you are searching) is a "pattern" and that means you can do special searches like in Regular Expression to find for example date in a string start, end = string.find( "Today is 29/04/2013", "%d%d/%d%d/%d%d%d%d" ) -- it would return 10 and 19 (date starts at character 10 and ends at character 19) There are more special (or magic) characters you can use, eg: start, end, day, month, year = string.find( "Today is 29/04/2013", "(%d+)/(%d+)/(%d+)" ) -- it would return 5 values: 10, 19 (like example above -^-) and also 3 more values captured between ( and ) => 29 04 2013 You can tell the function to ignore any special characters in the pattern and search for simple string: start, end = string.find( "Your clan is [clan]", "[clan]", 1, true ) -- the 3rd parameter 1 tell the function where to start searching for the substring, the last parameter tell the func to ignore any special characters (in this case: [ and ] are special chars) -- the result would be 14 and 19 (found at 14 and ends at 19) The string.find function is powerful but you can use the this example to find any simple substring you want ignoring any "magic" characters If you want to get string in between [ and ] (for example to get player's clan) then you can use the pattern as follows: start, end, clan = string.find( "[MYCLAN]PlayerName", "%[(%w+)%]" ) -- it would return 1, 8 and "MYCLAN" (found at 1, ends at 8 and the capture (%w+) => MYCLAN) "%[(%w+)%]" => %[ this means you want to find [ in your string, then (%w+) means you want to capture all the letters after [, and then %] means you want to finish looking for pattern at ] Like I said it's a powerful function but you need to know how the function works and what is Regular Expression because these 2 share the same logic. You said you read over and over again but can't understand, if you still don't understand then I'm not sure how to help you.
  11. And don't you want to make it open source? I will but just not sure when.
  12. I do use the user-defined object properties (set/getUserProp) to check if the model has been imported by KAM's script. Imported models contain "FrameName" which is the same name of the model defined in .ide files as well as gta3.img (and other .imgs). I may add my own custom data if I'll need to but so far it works fine. I've noticed the rotation problem before and I'll be resetting the rotation and position to 0.0 for the exporting and then move/rotate it back after exporting. As far as I remember that's what I did in my old script. Currently I'm trying to find information on .dds file format (which is part of what .txd files contain) but I can't find any information on how to convert/decompress the actual 4x4 data blocks to pixel colors. I've found lots of information on how to compress the files but nothing on how to decompress them and aru was going to help me with this one but he seems to be inactive and AFK all the time. I've been researching for 5 days now and found nothing that can help me. If I did know how does the DirectX reads the .dds files and displays the textures then I could make a TXD material in 3DS Max and apply them to models. If I won't find any more information then I'll have to export the .dds from .txd and use the .dds files themselves. What I've just written may seem a little complicated for someone who doesn't know much about 3DS Max and/or MAxScript'ing. Anyway, back to research.
  13. I'm actually thinking of loading resources manually. So, you can have a main directory of resources and then load resources from different folders/zips. User would pick a meta.xml or a zip file (zipped resource) and that would load the resource to resource explorer. That's just what I'm thinking. Because MTA:SE is not open source. Once I decide to go open source it will be official but until then I'm the only programmer.
  14. dxDrawText( "No. of players online: " .. tostring( #getElementsByType( "player" ) ), 10, 300 );
  15. Stopping the resource is the only way to unload scripts.
  16. It's not available yet. I'm working on it as we speak. I want to create a script that will also make .txd files. So, I'm learning about file formats to be able to convert them to DDS (DXTn compressed) format that is used for textures in DirectX games/applications. Yesterday I managed to read .txd files in 3DS Max and display all the texture names stored in the files but I'm still struggling how to convert the actual raw image data to pixels so that I can even display the textures within 3DS Max and apply them to models.that way I'll be able to import fully textured maps :> Like I said earlier, I'm researching the DXT compression as well as .txd file format. Wish me luck.
  17. If you had searched before asking, you'd find an answer: viewtopic.php?f=91&t=35778&p=369523#p370141
  18. 1. It was meant to be a script editor at first, so I only added support for .lua files but then I added support for .xml-based files (.map and .conf files) too. I might give the user an option to create any file extension files. 2. I want users to have MTA installed so that they can start client/server from within the editor itself (there is a new Test Resource button which will send request to the server to start/restart the currently opened resource, the server must be running) 3. I have to remake the server configuration window because there are more and more setting coming from time to time, so I also need to think of a way to dynamically add support for the new settings instead of adding them manually and releasing an update just for the new server settings. This is the reason why I disabled that option for now 4. I don't know what you mean by "our own functions". Do you mind explaining a little better? 5. (skipped) 6. Not currently. I don't want users to have a functions fetcher/updater because that requires 100s connections at a time to fetch all the functions from wiki. I have my own app which allows me to fetch all the functions from wiki. This way I can update the functions list file (MTAFuncs.db) and upload it so others can download it manually. If you want, you can update the file yourself. It's a simple SQLite 3 file so SQLite Database Browser can open this file. e1. I noticed that and I'll be trying to find a proper RegularExpression that will color the table/methods correctly e2. Open the options window (Tools->Options) and there you will have an "Integration with server" box that requires admin's username as well as password. You can create a fictional account on your server just for use by MTA:SE, and use that account to integrate MTA:SE with the MTA server. e3. I can't create folders in the resource explorer because they are not present in meta.xml. It's not a simple task to make user-friendly as well as program, because I don't want to display empty folders in the resource explorer as well as folders which are not even part of file's name in meta.xml (eg. ) e4. I wanted to add the events snippets to the auto-complete box but first I needed to add the more important thing (functions list) I hope it answers all of your questions and thanks for giving it a try. NOTE: Just to let everyone know who may be concerned about installer problem that Dealman had, the problem has been solved. His registry was a little messy and didn't let him install MTA:SE, I've also modified the installer so that even when another user has the similar problem, they will still be able to install it.
  19. 50p

    isPedBlood ?

    I'm sorry my brain gets hot when I read your posts. I can't help you. I hope someone else will understand you and try to help.
  20. 1. Meta.mxl points to *.pgn file (it probably does not exists), but in code you're trying to load .png (which are 2 different files) 2. engineLoadTXD does not load image files but .txd files (texture archives) 3. engineReplaceModel expects DFF element not a TXD element 4. To replace paintjobs you need to use a simple "texture replace" shader 5. DEBUG YOUR SCRIPT because I'm 100% sure you will get loads of error/warning messages 6. If the resource cannot be found that means it hasn't been loaded. If you were running the server before you created the new resource, the server will not know about the resource so you need to /refresh the server's resources. If you see an error message in the server's console saying "ERROR: Couldn't parse meta file for resource 'RESOURCE_NAME' " then you need to check the meta.xml for error (check point (1.) )
  21. 50p

    isPedBlood ?

    You need to explain better because nobody understands you.
  22. 50p

    Buymap doesnt work

    Fixing other resources requires knowledge which you're lacking. Asking us to help you fix it is like we're fixing it for you. You should ask the author of the script to fix any problems with their resources. We have no idea about the rest of the script and what problems you're having. We know nothing.
  23. 50p

    ban player

    What do you mean? In admin panel you just select the player and hit Ban. What has this line to do with the admin panel?
  24. It's difficult to understand you. Map files contain data that are present on the server (some are physical, some are just data holders). You can use many types of elements in the map. This is a list of some of the elements you may create: <object ... /> <marker ... /> <colrectangle ... /> <vehicle ... /> etc. You can check the types of elements on the wiki. If you open a createMarker wiki page you'll see the value it returns is "marker" (highlighted in green), when you click that it will take you to the page explaining what attributes are supported. Some gamemodes may have their own typed, like eg. race gamemode, it supports and . You can create maps in the Map Editor and once you save the map you will find the .map file with all the elements you created in Map Editor.
  25. Where do you want to use it?
×
×
  • Create New...