Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. tosfera

    OOP functions

    is that already built in, or will that be update. If so, Can't wait to rewrite everything!
  2. As far as I can see there is nothing wrong. Is this a downloaded script from the MTA dev's? Looks like it hehe, anyway. If so or if it's not, mind showing me the class Mta?
  3. That's not even the slightest helpful since he wants to work with DX, not GUI. 2 very, very different things. You can achieve what you want with interpolateBetween. "ok i seen in a server it was a dx login and i was wondering how they done the top bit they made a rectangle i know how to do that but they had text in it moving any help?" He only mentioned a dx login and moving text. Not a way how to create the moving text.
  4. You have to change your i to vehicleiD.
  5. tosfera

    OOP functions

    as far as I came, I couldn't recall the class in the other side ( created it in client-side, server side couldn't recall it ).
  6. tosfera

    OOP functions

    hahaha that randomly dutch word there. Ehh I'm not sure. I have never used the OOP shizzle for MTA. It's worth a try I guess? Let me know how it turned out ( if you're going to try, I'll try it too in a sec )
  7. the loop you're creating is giving you a small view back. Let me write you the view abit and you'll understand the error; 1 500 ( ex; infernus ) 2 501 ( ex; bullet ) 3 502 ( ex; uranus )
  8. tosfera

    OOP functions

    As far as I know, LUA doesn't have a way to be used in an OOP. Wish they made it, gawd that would be awesome. But it's not up to the MTA team to do so, it's up to the creators of LUA. Excuse me, LUA does have the ability to be used in an OOP-application. ._.' It is just... different haha http://lua-users.org/wiki/ObjectOrientationTutorial
  9. Or just search the wiki for the GUI tutorials.
  10. You know, back in the days people requested help. Some weird errors they couldn't understand. Now, they don't even put effort in learning english in a way that other people can understand them, and they are just requesting scripts? Oh, ya well good luck playing on one of these servers which are owned by people without any lua knowledge. Found a bug? Ya, sorry. It takes 2 weeks before the community fixes it for me! Might sound rude but... we should follow the rest of the community and stop giving them away their requested scripts. Let them learn their selfs... Jees.
  11. Well, you can use the fetchRemote from your webhost and keep taking images from it and pay a shitload for your bandwidth... or you can create a single php script or html page which only contains an iframe with a youtube video which doesn't take your bandwidth away. :3 ( some images can be in HD and take alot of bandwidth! )
  12. Since when did the english section turn into a spanish section...? Well if that's it, time to learn spanish! Hola anciano! No oke, sorry. Just post it in this section next time.
  13. Not tested, it is just a brainfart. local images = { "image1", "image2", "image3" } function startIntro () drawPicture ( images[1] ); image = 1; addEventHandler ( "onClientRender", getRootElement(), drawPicture ); setTimer ( function() drawPicture ( images [ image + 1 ] ); image = image + 1; end, 5000, #images ); if ( image == #images ) then removeEventHandler ( "onClientRender", getRootElement(), drawPicture ); end end function drawPicture ( pictureName ) local x, y = guiGetScreenSize(); dxDrawImage ( 0, 0, x, y, "images/".. pictureName ..".png" ); end
  14. setAccountData adds the item to the account of the player. As long as the player is logged in and you're using the command, it will stay. IF he ins't logged in, it will dissapear. So just make sure your players are logged in. To add the data back when they login; addEventHandler ( "onPlayerLogin", root, function ( thePlayer ) local account = getPlayerAccount ( thePlayer ); local engine = getAccountData ( account, "Engine" ); if ( engine ) then setElementData ( thePlayer, "Engine", 1 ); end end );
  15. tosfera

    Help my script

    since the dxDraw functions are only clientsided and has to be used with onClientRender You should add a new event and trigger it. Add a new eventHandler which would display what you want. Making this command client-sided would even be alot easier.
  16. addCommandHandler ( "giveItem", function ( thePlayer, theCommand, happyPlayer, item ) if ( thePlayer == "Jordan" ) then -- just for safety local account = getPlayerAccount ( happyPlayer ); if ( account ) then -- if he is logged in setAccountData ( account, tostring ( item ), 1 ); else outputChatBox ( "This player is not logged in. Their items will be lost when he or she reconnects", thePlayer ); end setElementData ( happyPlayer, tostring ( item ), 1 ); end end ); usage; /giveItem Jordan Engine
  17. well you don't need any HTML knowledge after this post. All you need to do is save this as a file; <html><body><iframe width="420" height="315" src="//www.youtube.com/embed/qneehBzpJKg" frameborder="0" allowfullscreen></iframe></body></html> Then, upload it somewhere everyone can see it. All you need to do, is write the lua script. I believe there is a computer system on the community which uses the same function to load pages.
  18. change function ( thePlayer, theCommand, happyPlayer, 1 ) to function ( thePlayer, theCommand, happyPlayer )
  19. Ehmm well you can just change the "item1" to "object" and "itemId" to 1. That would fix it.
  20. You want to create a movie thing ingame? That can be done, but you might want to checkout if you can include an iframed page of youtube in your game. Which would be an easier way. As far as I can tell you right now, you need to use get_file_contents in php. ( it's been a long time, can be another one. Sorry for that. )
  21. If you want to give item's to play you could either use a database ( mysql or sqlite ) or you can use the setAccountData / getAccountData. The elementData will be deleted whenever a player reconnects. Try this; addCommandHandler ( "giveItem", function ( thePlayer, theCommand, happyPlayer, itemId ) if ( thePlayer == ") then -- just for safety local account = getPlayerAccount ( happyPlayer ); if ( account ) then -- if he is logged in setAccountData ( account, "item1", itemId ); else outputChatBox ( "This player is not logged in.", thePlayer ); end end end ); note that this will only allow you to give 1 item each person. You'll have to create a table value or loop through all his data to find out if you can give a new item or add new values to it etc.
  22. there is; addCommandHandler ( "object", function ( thePlayer, theCommand, victim ) setElementData ( getPlayerFromName ( victim ), "Object", 1 ); end );
  23. Try this; local blips = {}; addCommandHandler ( "showatm", function () for index, blip in ipairs ( bankMarkers ) do if not ( #blips > 0 ) then table.insert ( blips, { blipid, bankMarkers[1], bankMarkers[2], bankMarkers[3] }; else destroyElement ( blips ); end end for i, b in ipairs ( blips ) do createBlip ( b[1], b[2], b[3], b[4] ); end end );
  24. If he didn't ? What's the problem? For example, the case of community resources, he may downloaded them and didn't know how to open ports. I faced the problem once, so being able to script has no relation to have knowledge to open such a port. That's true, I can't say anything about it. But c'mon, why did Google Inc ever made google? Why did MTA create this page; https://wiki.multitheftauto.com/wiki/Se ... forwarding ?
×
×
  • Create New...