Jump to content

arc_

Retired Staff
  • Posts

    136
  • Joined

  • Last visited

Everything posted by arc_

  1. arc_

    MTA Map Uploader

    So basically you have no idea about how php works or how to install/configure/run it. Sorry, but the MTA forum is not about teaching you that . Read some tutorials.
  2. Changing MTA to use unicode is not a "small tweak". Changes would have to made throughout all of the source code, and if you miss even one location, text will appear mangled in places, or worse, a crash will happen. It would be quite a task indeed. SA-MP has it easier here - they have much less features and thus less source code to take care of.
  3. You're joking, right? If you're serious, please go ahead and upload your modified .dll so that people can just download it instead of having to do the modifications themselves. In the other case, you are obviously spilling out nonsense trying to look like a 1337 h4x0r while potentially misleading people and wasting their time.
  4. Also, the "percent" parameter is a number between 0 and 1 in the above code (not 0 to 100).
  5. See the wiki page for the syntax, I even linked it.
  6. Sorry, I have neither. And even if I did, I wouldn't just write your gamemode for you . The information I gave you should be enough for you to do what you want. Well, maybe some addEventHandler example code is in order: function okButtonClicked() -- find out what item is selected and send it to the server end addEventHandler("onClientGUIClick", lsok, okButtonClicked, false)
  7. You want to attach an onClientGUIClick event handler to the button, and in that handler use guiGridListGetSelectedItem to find out what team was selected. From there you can use triggerServerEvent to send the choice to the server, so that the server can spawn you. An important note here is to set the getPropagated parameter of the guiclick addEventHandler to false, otherwise the button will also get triggered when the user clicks in an empty area of the window (because the button is a child of the window and thus receives its events) Also as a side suggestion, it would be more user friendly to have a button per team instead of a list. That way, players can directly click a team button and immediately spawn, instead of having to make a list selection and clicking "OK". You could even put little pictures representing the team skin in or next to such buttons.
  8. arc_

    [REL] WaterFlood

    Sebas has just "released" the example code from the createWater wiki page with some serverside additions. For those who don't want to bother installing a nightly build, here's a taste of what you will be able to do in MTASA 1.0: Water can be created, destroyed and repositioned on-the-fly (e.g. slowly rising water), so the functions are perfect for "escape the flood" or similar gamemodes.
  9. Like Talidan said, DP2 behaves buggily around negative money. Version 1.0 has these issues fixed.
  10. How was I supposed to know that? Anyway, have him look at the server's account.xml, see if the experience is stored in there. If it is, it's just a matter of running the setAccountData function (there's a tab in the admin panel where you can type Lua code to execute). You can look at the MTA wiki to find out how this function works. If it is not in accounts.xml, it will be in a gamemode-specific file or in a database. In that case you will have to find out what to do by yourself I'm afraid. You can already give people admin rights from the admin panel, if that's what you mean.
  11. You will have to ask the server owner to increase your exp for you.
  12. No, you're out of luck in that case . The accounts.xml is obviously stored on the server, and as a player you cannot access it. Please refrain from asking for cheating instructions on the official MTA forums in the future.
  13. Well, sure. The score that is displayed on the scoreboard is stored in the player's element data, which you can change with the setElementData function from any resource. You just need to know the name of the element data under which the score is stored. You can find this name out by looking at the gamemode's source code, or alternatively you can start the gamemode and output all the element data of a player, then look for the one that contains the score. Use the getAllElementData function for this. Similarly, account data can be set with setAccountData from any resource. Again, you need to find out the name of the score account data. Your best bet for finding this name is looking at accounts.xml, where the account data is stored.
  14. It's not very clear to me what you want. If you need to register a console command that players can use (so they can type things like /setskin, /buyhouse in the chatbox), look at the addCommandHandler scripting function. And the scoreboard simply displays data that is specified by gamemodes. This could be number of kills, number of stolen cars, anything really - the number is determined by the gamemode, the scoreboard simply displays it. If you want a particular gamemode to give you two points for each kill, you will need to edit the code of that gamemode.
  15. You might want to mention any ideas for gamemodes that you already have for the scripter to implement, or at least (if you don't want to throw the idea out in the open yet) make it clear *that* you have an idea ready. Or is the scripter supposed to come up with an awesome gamemode by himself, then write it and hand it over to you just like that? Concerning that, you should also make clear what's in it for the scripter: payment, admin status, ...?
  16. Check out the string.char and string.rep functions in the Lua manual. I have to say though that messing around like this to store an integer seems rather hacky. Unless for some reason you have no choice but to use binary files, I would recommend using an .xml file or an SQLite or other database.
  17. As Talidan said, the script is made for MTA 1.0 and will not work in DP2. MTA 1.0 is not yet officially released but you can download nightly beta builds. You will also need the "data files" and "net module" archives from the Google Code page.
  18. Install the data files archive from the "Download" tab on the Google Code page.
  19. Look closely at your code. You will see that the "your car is at 1000hp" message ("right") is inside the "if wallet < 1000". Therefore, the message will only appear if your car is healthy and you have too little money to do a repair. So, you want to do it like this: if hp == 1000 then outputChatBox("Your car is already in good shape", player) elseif wallet < 1000 then outputChatBox("You don't have enough money", player) else -- repair car with fixVehicle and takePlayerMoney end A few extra remarks: - Don't forget the player argument for outputChatBox. Without it, *all* players on the server will see the message. - Take better care of your code formatting, specifically indentation. The way you have it now it's pretty messy and not very readable.
  20. Replace if myCar then by if myCar == exCar then Not so difficult isn't it
  21. I really have my doubts about your SQL query. sqlTableSelect is a *Lua* variable, which SQLite does _not_ know about. The query in your example code would only work if you had actual columns named "v" and "sqlTableSelect" in your table, and where "sqlTableSelect" would also contain a multidimensional array per row (which I'm not even sure is supported by SQLite or is even in the SQL standard at all). I would really check for SQL error messages in the server console if I were you.
  22. No it wouldn't. First of all, "function.name" is used for scripting functions like killPlayer(), not console commands - for those you use "command.name". Also, I'm pretty sure that a "command.give 38" right will not work. If you are using the freeroam resource, you can specify disabled weapons in meta.xml. For other resources there might be a setting like this, but it's more likely you will have to edit the code of the command handler.
×
×
  • Create New...