Jump to content

Orange

Members
  • Posts

    327
  • Joined

  • Last visited

Everything posted by Orange

  1. But it will lag more than tunelling connection to database through SSH/Telnet. I basically use it only to retrieve map list and servers' status
  2. check directx text libraries, somewhere on forum (dxText or sth)
  3. This map sucks, when compared with previous ones, which were a lot harder. You used more markers than before, that's all.
  4. Have you heard of PHP, Object Pascal, Java and Python? They're just basic examples of what languages are capable of being OOP. OpenFrame is basically based on the idea of Kohana PHP framework (which I'm always using for my PHP projects). In future, I will take few more things from it, but first, I want a small interface to all MTA functions.
  5. It's called ACL and it's built into MTA :F
  6. As of 29 December 2011, you don't even need to create classes (only clientside right now, I will port it to serverside in few minutes). Example usage: Event:Create("onClientResourceStart"):Handle(onStart) -- is now onClientResourceStart:Handle(onStart)
  7. Orange

    Heartbeat

    Check out my code, it works.
  8. Orange

    Heartbeat

    Oh noes, pr0 scripters are helping another pr0 scripters local heartbeat = playSound("sounds/heart.mp3", true) setSoundVolume(heartbeat, 0) function onRender() if getElementHealth(getLocalPlayer()) and getElementHealth(getLocalPlayer()) <= 10 then setSoundVolume(heartbeat, 1) else setSoundVolume(heartbeat, 0) end end addEventHandler ( "onClientRender", getRootElement(), onRender)
  9. Yep But i change all elemente andnothing. Sure i need edit dxDrawRectangle but where and how. Edit: This is possible why i look many times ago one server with avatars 40x40 in scoreboard. Including my server with 32x32 mw2 rank icons... All elements? First try to analyze code, as I told you, and then start modyifing.
  10. http://en.wikipedia.org/wiki/Object-ori ... rogramming You'll know what is it when you see gungame gamemode. All I can provide from now are few lines of code from race scripts on Andromeda Race/DD/DM, which is completely written using OpenFrame. So, these are two main reasons why have I created it: function onShop(Source) onReturnShop:ClientTrigger(Source, Items:Get(false, Source:Level(), (Source:Team() == vip_team))) end onRequestShop:Handle(onShop) in fact, the same code without openframe will be function onShop() triggerClientEvent(source, getItems(false, getPlayerLevel(source), (getPlayerTeam(source) == vip_team))) end addEvent("onRequestShop", true) addEventHandler("onRequestShop", getRootElement(), onShop) Code is shortened and cleaner. Isn't it? (unfortunately, you have to create Event objects somewhere before, like in an additional file - I'm working on a fix for it) The second reason why I wrote it is this code: function Player:SkillPoints(value) if tonumber(value) then if not Stats:RowExists({["name"] = self:Account():Name()}) then self:Insert() --shortcut, here comes another function end return Stats:Update({"skillpoints = " .. tostring(value)}, {["name"] = self:Account():Name()}) end local t = Stats:Select({["name"] = self:Account():Name()}):itTable() if #t == 0 then return 0; end return t[1].skillpoints or 0; end Skillpoints are points on my race server which (as the name suggests) show how high is player's skill. Look at the "Stats" object. It's a query generator for a table in MySQL database. Isn't it easier to create queries like that? Script generates everything. Unfortunately, it's not so useful as it could be, because it should look like this: local result = Stats:Select():Where("orange", "=", "purple"):andWhere("yellow", "!=", "green"):Order("time", "DESC"):Query():asTable() Also, you can see that nothing except core classes really access LUA functions. That means, if I would like to move to SQLite, then I just have to modify MySQL class, so it will use other functions, while providing same output. Guess what? Query generator will still work! Thanks. It's not finished though. Code that I provided here won't work with current github version, mainly because of :Account() and :ClientTrigger() methods. I'm working on fixing that
  11. Can you just start browsing dxscoreboard_client? I told you - start a localhost server and start changing variables till you'll find the right one.
  12. Go to #care on irc and say that Awwu hates you :< Believe me, if you can analyze code then you'll be able to do it. Now stop asking us for ready answer.
  13. Impossible, GTA 3 on iphone probably uses another engine or sth
  14. Hey! Today, I decided to put my WIP version of OpenFrame 2.0 to github and create a gamemode based on it. So, here it comes! OpenFrame 2.0 http://github.com/pzduniak/openframe Sorry for not including credits for var_dump function AND gui classes by 50p, but I forgot to do it. I will put them in next commit. As of 12 December 2011, you can: Create OOP classes, which may be extended (inheritance) Shorten ur code - Source:Vehicle():Position() looks awesome Be proud that players download loads of useless files! (it will change, I'm working on a compressor :3) btw. it smells like an orange! You can pull it and help me finishing it of-gungame http://github.com/pzduniak/of-gungame Some freaking gungame gamemode which will show how to use OpenFrame. New weapon is every 3 kills (theoretically configurable, 0.1.1 coming soon). Headshots are enabled. It uses builtin mta maps system (compatible with Deathmatch maps). Using basic ideas of OpenFrame. Simple, but powerful and clearly-written (except logo.lua, which looks like spaghetti code - can someone help me with making it readable?). Currently it's not documented, but I'll do it soon. You can see it on Andromeda GunGame server. Few functionalities planned as of the 3rd January. I will update the topic while I will progress.
  15. Start a localhost server and try changing variables in dxscoreboard_client.lua
  16. Oh yeah, it was other, I remember. Anyway, nice finding, I hope that they'll change it in MTA 1.3
  17. That's why I use http://kohanaframework.org - no need of taking care of these freakin globals
  18. Orange, I'm still learning php, so don't judge me Oh, your advices made me facepalm. Maybe try to analyse mta_sdk.php sourcecode and perform the query by yourself? (afair it was http://host:port/call/resource/function)
  19. 1) Is display_errors enabled? 2) I use this one and it works: $mta = new mta( "127.0.0.1", 22005, "snip", "snip" ); $resource = $mta->getResource ( "internet" ); $returns = $resource->call ( "serverInfo" ); $returns = $returns[0]; Try debugging your LUA side. PHP seems to be ok
  20. Jaysds1, stop spamming. I bet that you don't know PHP. Callum: use var_dump
  21. I've got bad experience with him. A year ago his clan (?) has copied names of my clan (I don't know why did they do it). They were advertising their server where nobody played everyday. In this thread, he's going to copy one of unique features of my server (oh yeah, he's so pro that he can't do it himself). Oh yeah, I've got rank icons from mw2. Don't you remember when you were copying every idea? No Comment. Listen i have 20 years ago and i no want spend the time with the kids. 1.i never enter in u server 2.my name is hunterix ever 3.maybe the kinds banned in my server enter in u server . ..idk 4. i have 20 years (again) Who cares that you have 20 years ago (wtf is it)? I wish I had the logs when I joined the server and everyone was asking to ban me cuz "I am the faker". It happened 8 months ago. Let's stop this flame. I just want to say one thing: do not help him with editing scoreboard. If he's such a professional scripter, then he should know how to use dxDrawImage
  22. I've got bad experience with him. A year ago his clan (?) has copied names of my clan (I don't know why did they do it). They were advertising their server where nobody played everyday. In this thread, he's going to copy one of unique features of my server (oh yeah, he's so pro that he can't do it himself). Oh yeah, I've got rank icons from mw2. Don't you remember when you were copying every idea?
  23. Guess what, I'm not a noob and I tried every software like that. Fonts don't work, I don't know why.
×
×
  • Create New...