Jump to content

Charlie_Jefferson

Members
  • Posts

    242
  • Joined

  • Last visited

Everything posted by Charlie_Jefferson

  1. That's also right, TAPL. Thanks . Edit: Errors I get when I run it: [2012-01-15 00:16:20] WARNING: adminhud\adminhud_s.lua:3: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [2012-01-15 00:16:20] ERROR: adminhud\adminhud_s.lua:5: attempt to concatenate local 'acc' (a boolean value)
  2. Oh. Noob mistake there, for me... Anyway, strange that the debugscript and server window weren't displaying a function error.
  3. Do I look like a thief? If you don't want to help me alright, I'll figure it myself. Edit: Never mind. I deleted the script I had. Not gonna bother making it again. I got Castillo's gang system downloaded now, seems better than mine was.
  4. Hey, I've got a script which I've compiled by mistake, while trying a compiler I got. Is there any way to decompile it? I bound a key wrong in it, before I compiled it and forgot about that. Edit: I got luadec, but it opens once(when I click on luadec.exe), flashes a cmd and closes. I tried opening cmd by myself, writing luadec g_c.luac > g_c.lua and it said that luadec is not recognized as an internal or external command, operable batch file.
  5. All you have to do is write /create team [team name] on the desktop! It's simple as that! Not sure what you really mean with "destkop" I wrote desktop. You misread it though.
  6. Use playSound function and download the file that lets you listen live to the radio, from the radio's website.
  7. Hi. I'm trying to make an admin "hud". It's basically some labels, which display down the screen, so you know your account name, admin level and nickname. I can't seem to get it working though. No errors are displayed. I checked both, server window and debugscript. It's a simple thing, thought I can't do it... Help? :3 Client code function createGUI(acc, atype, pname) accname = guiCreateLabel(11,745,96,18,string(acc),false) admtype = guiCreateLabel(135,745,96,18,string(atype),false) nick = guiCreateLabel(280,745,96,18,string(pname),false) end addEvent("infosend", true) addEventHandler("infosend", root, createGUI) Server code function check() acc = getAccountName(source) if isObjectInACLGroup("user."..acc, ACLGetGroup("admin")) then atype = "admin" pname = getPlayerName(source) triggerClientEvent("infosend", root, acc, atype, pname) else end end Note: I only wrote 1 acl group yet, for the testing to be easier. I made this script quickly(2 minutes) because I was on a rush.
  8. Lols.. I made a noob mistake. I forgot to edit the resource name in the acl group >.>. It will probably work now. Let me check. It works, but the camera matrix doesn't change and it remains on the vinewood sign. I fixed it. Edit2: When I type keys that are binded to MTA's chat system, they work, even if I toggled the controls. Do I have to unbind them and bind them after? Edit3: Fixed .
  9. Thanks. Will test now. Edit: Still I get access denied.
  10. Kenix, I had to edit your script a bit to work . The server one is perfect though. "Access denied for addAccount." I'll look in the acl.xml to change it so the script can access it. Edit: I'm a noob, how do I do that?
  11. All you have to do is write /create team [team name] on the desktop! It's simple as that!
  12. Vedic's script is NOT stolen, it has been edited, in very many ways, such as account-system, items, even the authors are changed, I believe. (my statement fails... If you edit a script that isn't yours it's still stolen. God darn it.)
  13. Thanks for pointing that out. I know how to do this, if it happens again ;P. Edit: I got 2 more errors and a fail in the script. Sorry for bothering you, but I need more help. The errors are these two: [2012-01-12 13:13:13] WARNING: acc-sys\acc-sys-server.lua:17: Bad argument @ 'logIn' [Expected player at argument 1, got root] [2012-01-12 13:13:13] WARNING: acc-sys\acc-sys-server.lua:21: Bad 'player' pointer @ 'spawnPlayer'(1) And whenever I type a random username+password and click login without registering, it works. I tried fixing it by doing this acc = getAccount(untxt, pstxt) if untxt and pstxt ~= false and acc == true then but the login button doesn't work at all now.
  14. I'm dumb >.>. Edit: Didn't work. I still got the same errors... It changed lines though, as Solidsnake's script had something edited. WARNING: acc-sys\acc-sys-client.lua:52: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil] WARNING: acc-sys\acc-sys-client.lua:59: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
  15. Use a colshape and use onColShapeLeave, it's easier.
  16. That's what I had after editing my script a bit. It still gives me the same errors.
  17. I reviewed the script and edited it a bit. I got something like this: Invalid argument 2 at event handler, line 48 and 58, got nil. But the button is defined in the GUI script and it is global. What's up with that?
  18. Thanks. I know it's messy. I'm not good at organizing. What about the error?
  19. Hi, I'm making a login/register script and I added a dxDrawText to it, but when you login, I want the dxDrawText to disappear, is there any way to do that? I thought about settimer to the event handler, but if the player doesn't login until the timer's up, or logins too fast, then that would fail. Can you help me? Client code: function createGUI() showCursor(true) setCameraMatrix(1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) toggleAllControls(true, thePlayer, true, true) GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Grid = {} rgbtn = guiCreateButton(386,360,99,20,"Inregistreaza-te",false) lgbtn = guiCreateButton(494,360,99,20,"Logheaza-te",false) un = guiCreateLabel(375,294,88,21,"Username: ",false) ps = guiCreateLabel(377,322,88,21,"Password: ",false) whatsnew = guiCreateLabel(374,405,202,19,"Ce e nou?",false) guiLabelSetHorizontalAlign(whatsnew,"center",false) thenewstuff = guiCreateLabel(384,434,191,18,"- Sistem de login/register terminat",false) uned = guiCreateEdit(443,294,103,20,"",false) psed = guiCreateEdit(443,321,103,20,"",false) upstuff = guiCreateGridList(0,0,1015,176,false) guiGridListSetSelectionMode(upstuff,2) guiSetAlpha(upstuff,0.34999999403954) downstuff = guiCreateGridList(0,592,1015,176,false) guiGridListSetSelectionMode(downstuff,2) guiSetAlpha(downstuff,0.5) end -- Direct X Drawing addEventHandler("onClientRender",root, function() text = dxDrawText("RDK Freeroam",277.0,162.0,411.0,219.0,tocolor(255,255,255,255),3.0,"diploma","left","top",false,false,false) end ) addEventHandler("onClientResourceStart", root, createGUI) addEventHandler("onClientGUIClick", lgbtn, function getEdits() untxt = guiGetText(uned) pstxt = guiGetText(psed) triggerServerEvent("login", root, untxt, pstxt) end) addEventHandler("onClientGUIClick", rgbtn, triggerServerEvent("register", root, untxt, pstxt) function logged(thePlayer) guiSetVisible(rgbtn, false) guiSetVisible(lgbtn, false) guiSetVisible(un, false) guiSetVisible(ps, false) guiSetVisible(uned, false) guiSetVisible(psed, false) guiSetVisible(upstuff, false) guiSetVisible(downstuff, false) guiSetVisible(whatsnew, false) guiSetVisible(thenewstuff, false) toggleAllControls(false, thePlayer, false, false) end addEvent("loggedin", true) addEventHandler("loggedin", root, logged) Server code: function reg (thePlayer) local regAlready = false if untxt and pstxt ~= nil and regAlready == false then addAccount(untxt, pstxt) local regAlready = true if untxt and pstxt == nil and regAlready == true then return end end end function loginS (thePlayer) acc = getAccount(untxt, pstxt) if untxt and pstxt ~= false then logIn(source, untxt, pstxt) else return end spawnPlayer (thePlayer, 0.0, 0.0, 5.0, 90.0, 0) triggerClientEvent("loggedin", root) end addEvent("register", true) addEvent("login", true) addEventHandler("login", root, loginS) addEventHandler("register", root, reg) Edit: I also get an error, which makes the script not load: expected "(" near getEdits.
  20. Progrese. Am adaugat mai multe masini si am facut login/register GUI. http://imageshack.us/photo/my-images/80 ... 93633.png/ Sneak peak.
  21. He installed 1.2 and it worked. We tried it on 1.1 and it didn't work. Thanks
  22. Thanks for a quick response. He tried doing that, didn't work .
  23. Charlie_Jefferson

    Help!

    Hi, I'm trying to make a server with real cars, but everytime my friend connects to it and the real cars script is started, it gives him the error downloading files and the file which doesn't work. I ended up deleting the script for it to work. What's wrong?
×
×
  • Create New...