Jump to content

mabako

Members
  • Posts

    95
  • Joined

  • Last visited

Everything posted by mabako

  1. Guess what, I'm sure you're wrong. Since I'm working on my own gamemode, I'd rather spent hours on pen1l than 20 mins on writing a tutorial. Besides I'm crappy at writing tutorials, and I wouldn't know what to write about.
  2. Ahh I see... 6 Lua Tutorials reached, took you some time. I'm really looking forward to see more advanced tutorials
  3. sure it is possible, just look at this script for example: viewtopic.php?f=91&t=21071
  4. guiLabelSetColor( label, r, g, b )
  5. mabako

    xmlCreateFile

    ah I see change xmlCreateSubNode ( info, "bank" ) -- add a subnode <bank>, now we got "<info><bank/></info>" xmlNodeSetValue ( bank, 0 ) -- change the value, "<info><bank>0</bank></info>" to local subnode = xmlCreateSubNode ( info, "bank" ) -- add a subnode <bank>, now we got "<info><bank/></info>" xmlNodeSetValue ( subnode, 0 ) -- change the value, "<info><bank>0</bank></info>"
  6. you might need to add the function before assigning an event calling it.
  7. you could try "debugscript 3" - I couldn't see an error from your code. Another idea might be a outputChatBox in function exitTheInfoWindow() - so you know whetever it's called AT ALL
  8. just add it at the very end of broph.lua
  9. mabako

    xmlCreateFile

    function createBankAccount ( player, commandName, playname ) cash = getPlayerMoney ( player ) -- info = xmlCreateFile ( "playname.xml", "info" ) -- create the file "playname.xml" which looks like "<info/>" xmlCreateSubNode ( info, "bank" ) -- add a subnode <bank>, now we got "<info><bank/></info>" xmlNodeSetValue ( bank, 0 ) -- change the value, "<info><bank>0</bank></info>" xmlSaveFile ( info ) -- save the file xmlUnloadFile( info ) -- unload it after use outputChatBox ("BANK SOON ?") end addCommandHandler ("cba", createBankAccount ) cba = can't be arsed :') I should have an idea what I'm doing with XML at least, my houseeditor for pen1:legends is based on XML, so are my accounts files... etc.
  10. indeed it is - it's poorly documented and wont work by just-loading. When you once managed to get around the "can't use function ..."-problem, it's still crashing your server when you (re)join after having a registered account.
  11. an example script to give players money could be: addEventHandler("onPlayerSpawn", getRootElement(), function setPlayerMoney( source, 10000 ) -- gives the player $10,000 on spawn end )
  12. ever tried using "window" again?
  13. It was, yes. But the one I put up there was buggy and not up-to-date (would crash your server in particular situations), so I wouldn't recommend you to use the server-side script. I've never claimed this script as released, hence it's probably older than the one I'm using right now on the server and might not work, at all, can't tell you. Impressing at least how a yet-so-simple script makes it to a request.
  14. "try" is the correct word here, thanks $$$SnIpE$$$. You're afraid of me saying so, norby? You must be afraid now really, I won't release PEN1: Legends to the public. I've made it for my server, and I think it'll stay there. You are still free to play it at certain times (when the server is started, sometimes I just keep it down for some hours). Please check out http://mtasa.org/forum if you're interested in it, but it won't be public for everyone to download it. cheers mabako
  15. I don't get your point, szlend. The MTA Team released, and at all made, this mod because they WANTED to release it to the public, that's their primary goal - letting people play MTA and let everyone host a server. Now, from my point of view (since i'm working on public enemy no.1: legends), I wouldn't release this script ever. I'm aware it might not be stable, it might be buggy, but that's why I am here and working on it. If there was noone working on the server, so the script wouldn't get used, I'd sure agree with you it would be better to have people expanding/improving it. But right now, I want this as an exclusive mod for my server - so people keep playing on MY server when they want to play MY gamemode, not on any other server that has nothing to do with mine. So I serve them exclusive content, ie. my script, which I've put A LOT OF WORK into - all on my daily free time, I AM NOT GETTING PAID FOR IT. So it's just the minimum expectation a scripter might have when not releasing his script - having other people like it and play on their server, and a unique script, which is (as norby said), attracting to more players than a script on hundreds of servers. As I've released another script, mabako-services, this is yet another one i COULD have kept for my own, but I didn't do so. It's very easy to explain why - it's useful to probably a lot of people, it expands gameplay and it cooperates well with (good coded) modes, but yet something I've spent time on. But the point here is that it will probably be used by a lot of people, and is useful for a lot of servers with DIFFERENT modes - this makes it enjoyable. When releasing public enemy no.1 legends, it would just be the same gameplay, the same stuff and all the same things you're certainly doing. But I've put hours of work into it to make it a good gamemode and want people not to use it (like mabako-services), to have their own (maybe modified) script or to have the script, at all. I want to keep it private to my server, to get players and not just being a quick-pick for some servers because it's a great/cool/nice script while making the variety of gamemodes smaller and not getting me anything in exchange for the time I've put in. So, to summarize it: You won't get large RP modes, or great/cool/nice other gamemodes just because you want them. It's up to the authors, some may hand it out if you pay them a certain amount of money for the work they've put in, some might do that for free, and some will never release it as it's a script for their yet great server.
  16. indeed it'd be useful - tbh, i don't think a relative parameter is even needed - sizes below 1 px should be relative, and above absolute
  17. <shop id="VEHI" type="vehi" elseif( sType == "cars" ) then use either "cars" or "vehi" as type - it should be the same as the name of your folder in images/ then... look for elseif( type == "ammu" ) then width = columns * 110 + 10 height = rows * 120 + 50 and add below elseif( type == "cars" ) then width = columns * 210 + 10 height = rows * 125 + 20 and then your code should be elseif( sType == "cars" ) then sImages[articleID] = guiCreateStaticImage( x/2 - width/2 + 210*lastColumn + 10, y - height - 20 + 125*lastRow, 200, 75, "images/" .. sType .. "/" .. img .. ".png", false, nil ) sButtons[articleID] = guiCreateButton( x/2 - width/2 + 210*lastColumn + 10, y - height + 65 + 125*lastRow, 200, 20, name .. " - $" .. tostring( price ), false, nil )
  18. somewhere at the end, you should notice elseif( shops[shopID].Articles[articleID].Fuel ) then local newFuel = shops[shopID].Articles[articleID].Fuel if( getElementData( source, "jetpackFuel" ) ) then newFuel = newFuel + tonumber( getElementData( source, "jetpackFuel" ) ) end if( newFuel > tonumber( get("MaxJetpackFuel") ) ) then newFuel = tonumber( get( "MaxJetpackFuel" ) ) end setElementData( source, "jetpackFuel", newFuel ) now, before the end, add elseif( shops[shopID].Articles[articleID].VehicleID ) then local playerX, playerY, playerZ = getElementPosition( source ) local vehicle = createVehicle( shops[shopID].Articles[articleID].VehicleID, playerX, playerY, playerZ ) warpPlayerIntoVehicle( source, vehicle ) -- maybe, only if you want the player to join that vehicle on buying
  19. "amazing"... before I've started writing resources for MTA, i had almost no experience in LUA, or let's say a very small amount what everyone could learn in a day or two
  20. added Jetpacks now, those work with Fuel (buyable at ammu-nations) and may be obtained at any ammu-nation by now (you can change that of course) for 5% - $500, 20% - $2000, 50% - $5000. You can't use jetpacks in interiors, and you can't enter shops in this script while having a jetpack on. Whenever you die, your jetpack will be removed from your player, but you keep the amount of fuel (an error happened with this before, when you respawned in an interior and had a jetpack, you couldn't remove it) enjoy as always.
  21. just give everyone money on spawn, or on join, etc. you could also just use addEventHandler( "onPlayerSpawn", getRootElement(), function setPlayerMoney( source, 10000 ) end ) server-side
  22. My first priority is after jetpacks to get an armor-icon which i could use, then I could, of course see about transfenders/loco low/Wheel Arch Angels - which would be good as well. But i can't tell you anything yet, as I'm not totally sure, it'd be good, but it might take some time.
  23. ah yeah, then I've no idea about Hay - maybe the boundings are placed way too restrictive? btw... http://mabako.net/mta-screen0029.png http://mabako.net/mta-screen0031.png ... soon
  24. Capture The Orb: ctoclient.lua search for function onClientElementColShapeHit_cto ( colshape, matchingDimension ) -- can get called lots of times tho outputDebugString ( "You hit the colshape!" )--- add below: if( colshape ~= orbCol ) then return end Hay: hay.lua search for local barrier_x local barrier_y local barrier_r add below local barrier search for local barrier = createColCircle ( barrier_x, barrier_y, barrier_r ) addEventHandler ( "onColShapeLeave", barrier, function ( p ) if ( getElementType ( p ) == "player" ) then replace with barrier = createColCircle ( barrier_x, barrier_y, barrier_r ) addEventHandler ( "onColShapeLeave", barrier, function ( p ) if ( source == barrier and getElementType ( p ) == "player" ) then At all, it isn't my fault, but the fault of Aeron and error404 for creating such "greedy" gamemodes - who trigger EVERY colshape, not only the ones created by the cto/hay script.
  25. I'm sorry, I meant getClientAccount local account = getClientAccount( source ) And that is a difference, because i can login as FUBAR (/login FUBAR password), but that's not the account named [NB]mabako I use then
×
×
  • Create New...