Jump to content

DiSaMe

Helpers
  • Posts

    1,449
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by DiSaMe

  1. ZDay gamemode by Slothman has zombie bots, but they have no weapons. I don't know any other gamemodes which have AI enemies.
  2. A script in my gamemode uses a loop which isn't infinite, but execution takes too long, so it's aborted before it's finished. Is it possible to increase maximum loop length?
  3. When you draw image client-side, you create green squares. Their coordinates are transferred to the server with triggerServerEvent when you close drawing window. Server uses them to store data in a matrix, 128x128 table. If a pixel is drawn over, its value in the raster is true, otherwise it's nil. Then it creates TXD file, and writes the beginning until it reaches position where raster data in the file starts. It cycles through the table, writes image data and final RW sections, then closes the file. Firstly I made it create BMP files because that format is very simple.
  4. There's no function findPlayerByName, unless you create one. If you need to get player with a specified nickname, use getPlayerFromName. And it's better to store function result in a variable if you need to use it a few times. I'll try to correct your code addCommandHandler("use", function(player,command,Fun,FunPlayerName) local playerToFun = getPlayerFromName(FunPlayerName) if playerToFun then outputChatBox (FunPlayerName.." #FF0000is use "..Fun.." with "..getPlayerName(player),getRootElement(),51,255,0,true) end end )
  5. they are named same.. look at my earlyer post They aren't named same. They only use variables which are named the same. Second texture is loaded after the first has already been imported, so it's not the problem.
  6. Make sure that the path to the files is correct.
  7. DiSaMe

    Walk Ped?

    So you can set destination coordinates serverside and use them clientside. Then every client will control the ped separately, but the results will be the same. Peds work in this way in the video I posted.
  8. Hmmm.... Maybe not... Not yet I think I will work a bit more on it and then release it.
  9. DiSaMe

    creat water

    And I want to have a dam and underground tunnels and subways outside the map.
  10. function showPlayersList() local all_players = getElementsByType("player") for num,this_player in ipairs(all_players) do local plname = getPlayerName(this_player) dxDrawText(plname,100,100+num*16) --num increases with each cycle, so every name is drawn under previous name end end addEventHandler("onClientRender",getRootElement(),showPlayersList) Maybe this will help you to start.
  11. Don't use math.random to get skin directly. It may return ID which doesn't have a skin defined in. It's better to make a table of available skins and use it.
  12. The last line has a bracket which shouldn't be there.
  13. DiSaMe

    Pickups

    MTA supports health, armour, weapon and custom pickups, not just weapons. Make it a custom pickup and set the model ID.
  14. DiSaMe

    Walk Ped?

    Really? It has always worked fine for me. In video peds use getPedCameraRotation and setPedControlState to walk. They follow path nodes with no problems.
  15. DiSaMe

    Flag ped?

    MTA doesn't have function to make ped kill another ped. As I already said, there's no function turnServerToARoleplayServer either.
  16. DiSaMe

    Flag ped?

    https://wiki.multitheftauto.com/wiki/OnPlayerWasted https://wiki.multitheftauto.com/wiki/OnPedWasted These events have killer parameter.
  17. Why do you keep creating topics? If you're so curious, you could ask everything in one topic. You can't directly change weapons parameters. But it's scriptable. For example, script can detect when the player is hit by a weapon and lower his health, so it would imitate increased weapon damage.
  18. Yeah, yeah... Where's the function makeTheServerARoleplayServer? Nowhere. But somehow people manage to run roleplay servers. That's what scripting is for.
  19. What doesn't work? Does it output "Unable to open connect.xml" into chatbox or what?
  20. With MTA functions you can do almost anything you can do in main.scm. And there's much you can do in MTA, but not in main.scm.
  21. No, MTA doesn't use SCM functions at all. And it doesn't need them. It has its own functions.
  22. DiSaMe

    Walk Ped?

    As I said, you need trigonometry. Calculate the angle and set it with setPedCameraRotation.
  23. DiSaMe

    Walk Ped?

    You need setPedControlState and some trigonometry.
  24. DiSaMe

    creat water

    He wants to create water outside bounds of GTA SA map, so coordinates would be <-3000 or >3000. As far as I know, you can't do that. That must be GTA limitation, but it still would be nice to see MTA overcome it (it's not impossible, is it)
×
×
  • Create New...