Jump to content

Chlorek

Members
  • Posts

    131
  • Joined

  • Last visited

Everything posted by Chlorek

  1. Some more lines... hmmm, if I want to save that in SQL db it's same work. I'll make both methods then I'll check what's simpler and how it works.
  2. Of course, it's method too but that is too much work. ;]
  3. Oh saving to XML files isn't (for me) too good method. I think the most usable is SQL. Right, thanx for help ;]
  4. Yea, I saw a lot of scripts with use SQL but it's not the easiest method. I'll use that but just I want to know is there any other, safe method.
  5. So, what do you prefere to use instead of saving in account data?
  6. Hi people. I made userpanel script with saving car mods, and it (I don't know why) doesn't work I don't know does not work saving or loading mods list. My source: function savecar1() local car2s = getElementData(source, "car1D") local upgrades1 = getVehicleUpgrades(car2s) --maybe problem is here? local color1, color2, color3, color4 = getVehicleColor ( car2s ) ------------------------------------------------------------------------- setAccountData (getPlayerAccount (source), "clroleplay-upgr1", upgrades1) setAccountData (getPlayerAccount (source), "clroleplay-col1", color1) setAccountData (getPlayerAccount (source), "clroleplay-col2", color2) setAccountData (getPlayerAccount (source), "clroleplay-col3", color3) setAccountData (getPlayerAccount (source), "clroleplay-col4", color4) ------------------------------------------------------------------------- outputChatBox("Vehicle #1 Saved!", source, 255, 255, 0) end addEventHandler ("savecar1", getRootElement(), savecar1) And my loading function: function spawncar1() local car2destroy = getElementData(source, "car1D") destroyElement (car2destroy) local x,y,z = getElementPosition(source) x = x + 5 local carID1 = getAccountData (getPlayerAccount (source), "clroleplay-car1ID") if(tostring(carID1) == "false" or tostring(carID1) == "" or tostring(carID1) == nil)then outputChatBox("This slot is empty!", source, 255, 255, 0) else local car1 = createVehicle(tonumber(carID1),x,y,z) setElementData (source, "car1D", car1) local color1 = getAccountData (getPlayerAccount (source), "clroleplay-col1") local color2 = getAccountData (getPlayerAccount (source), "clroleplay-col2") local color3 = getAccountData (getPlayerAccount (source), "clroleplay-col3") local color4 = getAccountData (getPlayerAccount (source), "clroleplay-col4") local upgrades1 = nil local upgrades1 = {} local upgrades1 = getAccountData (getPlayerAccount (source), "clroleplay-upgr1") local car2save = getElementData(source, "car1D") setVehicleColor( car1, color1, color2, color3, color4 ) for i,v in ipairs (upgrades1) do addVehicleUpgrade (car1, v) end end end addEventHandler ("spawncar1", getRootElement(), spawncar1) I think it's simple error but I can't find a way to fix that. It's one of the oldest my scripts but I never found answer what's wrong
  7. Yea, good job solidsnake Always you are right. Well you have to do that server sided and don't use getLocalPlayer() func.
  8. But can you say what doesn't work? Outputting messages or what? For first look it looks ok. #Edit I am not sure but it should be math.random(1,7)
  9. Hex is something like RGB but another writing method. #RRGGBB - hex, RRRGGGBBB - RGB. So eg. #FFFF00 and 255,255,0 is yellow. Both methods are good and usable.
  10. Yo yo all MTA people, maybe some people member me. It's really long time I wasn't on MTA forum, I just didn't play MTA. But now I am going to come back and open my server CL-Roleplay. However, nice to be back in MTA and join my CL-Roleplay project again. I was playing minecraft, I opened my own server but I am so bored with minecraft now.
  11. I told him, he's checking it.
  12. I have: - creating/destroying blocks - one model (dirt), but I have problem with texture - first person view (I have one bug to fix there) - saving/loading blocks (I have to upgrade it for a bit) - sounds from minecraft (when you move, build etc) - choosing blocks by mouse wheel - choosing blocks in GUI binded to B button (not finished) - and some things like in each gamemode (login/register GUI, some usable scripts) There is still so much to do. And about objects limit, I have one idea how to make it even if there is more objects than limit. But everything in finally version (may I'll upload it to the community).
  13. But it's not my txd file and dff. It was made by my fried who know how to do that - he is gta:sa modder. ps. still it doesn't work.
  14. off-top: true is for filtering textures
  15. Same problem. Right so it's becouse of txd file. Right, I'll try to fix it. Thx for help guys.
  16. Sup, so I scripted loading new txd and dff. Files are correctly. Now my client side code: dirtTXD = engineLoadTXD ( "data/dirtBlock.txd", true ) engineImportTXD ( dirtTXD, 2584 ) dirt = engineLoadDFF ( "data/dirtBlock.dff", 2584 ) engineReplaceModel ( dirt, 2584 ) And I get error in the debug: bad 'txd' pointer @ engineImportTXD'(1) What's wrong?
  17. And good, I need it on server side only =]
  18. No, listen. I have an xml file. And now, I want to delete this file. Understand?
  19. Hello there, I scripted saving something to the file .xml but I need delete it. So how to do that? #Edit I mean delete file or all from him.
  20. I know it very well... but I don't want to create secound minecraft in gta/mta. I wanna making something like minecraft. I know my resource can be big fail but I wanna try to make it. Now I have about 40% and everything works very well. So, when I finish I'll make minecraft server on-line. Then players will check how is it good.
  21. Yeah, it's true. But what's limit?
  22. I am not sure what you want to say but each player can make blocks without limit. There are simple mc blocks like dirt, sand, stone etc (I am still modeling).
  23. Hey orange, I know lua very well and I think I can do that myself, but quickler is making gamemode together with another scripter. Just I need somebody to help but this help isn't necessary! I scripted two gamemodes and this minecraft resource is my third. I know lua enough to do that. And like told it DarkLink "if you dont wanna help just dont post here". And this resource isn't super hard, but I don't say it's also easy... Everything is possible to do, but it takes a lot of time. My last gamemode CL-Roleplay took over 1 year. I think minecraft will take so much time too.
  24. really usable function! maybe someone will need it but I have saving/loading to/from xml file. I never heard about this really usable function.
×
×
  • Create New...