lil Toady Posted September 16, 2007 Share Posted September 16, 2007 Well i ask as i want to know if somebody is interested in an admin tool (win32 app) that uses Lua scripting language (The same as MTASA DM does). I'd say it's pretty fast and powerfull on it's own. Link to comment
darkdreamingdan Posted September 16, 2007 Share Posted September 16, 2007 i never learnt to script mirc myself, id say its better to release than do nothing with it Link to comment
lil Toady Posted September 16, 2007 Author Share Posted September 16, 2007 Here's a list of functions it currently provides: EVENTS:onStart ( ) onConnect ( ) onAdminChat ( string text ) onAdminMessage ( string text ) onPlayerJoin ( int playerID ) onPlayerPart ( int playerID, int reason ) -- Reasons: 1 - kicked, 2 - time out, else - quit ( not accurate, find out urself, i was lazy ) onPlayerChat ( int playerID, string text ) onPlayerKilled ( int playerID, int killerID, int weaponID ) onPlayerHealthChange ( int playerID, float newHealth, float OldHealth ) onPlayerPositionChange ( int playerID, float X, float Y, float Z ) onVehicleEnter ( int playerID, int vehicleID, bool passenger ) onVehicleQuit ( int playerID, int vehicleID ) onVehicleHealthChange ( int vehicleID, float health ) FUNCTIONS: void sendChat ( text ) void sendMessage ( playerID, text ) string getServerName ( ) string getServerMOTD ( ) int getServerGame ( ) int getServerGameMode ( ) //that's for gta3 int getServerMaxPlayers ( ) string getPlayerName ( int playerID ) float getPlayerHealth ( int playerID ) int getPlayerKills ( int playerID ) int getPlayerDeaths ( int playerID ) int getPlayerMoney ( int playerID ) //that's for race int getPlayerVehicle ( int playerID ) float, float, float getPlayerPosition ( int playerID ) void slapPlayer ( id ) string getVehicleName ( int vehicleID ) float getVehicleHealth ( int vehicleID ) float, float, float getVehiclePosition ( int vehicleID ) float, float, float getVehicleSpawnpoint ( int vehicleID ) int getVehicleDriver ( int vehicleID ) bool getVehicleIsPassenger ( int vehicleID, int playerID ) string getWeaponName ( weaponID ) I'd say it's pretty powerfull and fast And you can build some nice anti-cheat thing with this ^ Link to comment
MeanpantheR Posted September 21, 2007 Share Posted September 21, 2007 anything new for MTA 0.5 is good. I think this will give people a starting boost in learning lua ready for MTA:SA/DM Link to comment
lil Toady Posted September 27, 2007 Author Share Posted September 27, 2007 k, here's some kind of a beta version of the program: http://mta-stats.com/downloads/mtala.rar if you have some problems tell me. It has some list of scripting functions inside. some simple scripts look like that: addEventHandler ( "onPlayerJoin", "onPlayerJoin" ) function onPlayerJoin ( id ) sendMessage ( id, "welcom to my server, "..getPlayerName ( id ) ) end addEventHandler ( "onPlayerChat, "onCommand" ) function onCommand ( id, text ) local tokens = string.split ( text ) if ( tokens[1] == "!info" ) then sendChat ( "Admin Panel by lil_Toady" ) end end ah ye, a bit messy with connecting atm, via command string it is: MTA Admin.exe <ip> <port> <name> <password> like this: MTA Admin.exe 127.0.0.1 4003 Admin 12345 it's defaulted to that ^ My TODO list: finally add banPlayer(), kickPlayer(), banIP() (yeh im lazy ) sql support file writing/reading getVehicleColor() gettok() accepting function request if somebody is even gonna use this might do a version for race if someone needs it and if somebody knows c++ and wants to do a gui version, im fine with sharing the sources Link to comment
[FMJ]ParadoX Posted September 27, 2007 Share Posted September 27, 2007 good one thanks for realease (nub) xxx mwah mwah Link to comment
MeanpantheR Posted September 28, 2007 Share Posted September 28, 2007 nice one I'll test it out properly later and leave some feedback for you Link to comment
Oli Posted September 29, 2007 Share Posted September 29, 2007 lol is this based on those sources i gave u a while back? Link to comment
lil Toady Posted September 29, 2007 Author Share Posted September 29, 2007 lol is this based on those sources i gave u a while back? Nah, you weren't replying about using your sources in this so i've rewritten all the thing from scratches P.S: Orion was buggy too Link to comment
Oli Posted September 30, 2007 Share Posted September 30, 2007 lol it was about 5 hours work and about 10% done i dont think ive even got it any more.. besides whenever i get free time to code now i do it on mta Link to comment
Winky Posted October 6, 2007 Share Posted October 6, 2007 Nice Still like the classic mta's Edit: Are there some good lua editor's? Edit2: Wow it works fast Link to comment
lil Toady Posted October 7, 2007 Author Share Posted October 7, 2007 updated the dl link, fixed a lot of bugs and added about 10 more functions. Download: http://mta-stats.com/downloads/mtala.rar Up to date scripting functions can be found here: http://mta-stats.com/downloads/mtala-scripting.html Link to comment
Recommended Posts