Jump to content

FlyingSpoon

Members
  • Posts

    749
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by FlyingSpoon

  1. Any exports? Any wiki pages to start people off, it seems really useful I would love to use it
  2. Alw7sH what about a .db file That'll be SQLite correct?
  3. If you know SQL or MySQL use that, Or if you hate that use these, setElementData getElementData setAccountData getAccountData
  4. It says like getPlayerTeam etc, However, if you do this Client-Side - No errors are outputted local team = getPlayerTeam(player) local health = getElementHealth(player) function respawn() if team then if (getTeamName(team) == "Assasin") and health <0 then spawnPlayer(source, 0, 0, 5, 0, math.random(0, 288), 0, 0, spawnTeam) outputChatBox("Bạn đã được respawn", source, 255, 0, 0) giveWeapon(source, 8, 1) giveWeapon(source, 1, 1) elseif (getTeamName(team) == "Gunner") then spawnPlayer(source, 0, 0, 5, 0, math.random(0, 288), 0 ,0 spawnTeam) outputChatBox("Bạn đã được respawn", source, 255, 0, 0) end end end addEventHandler("onClientResourceStart", root, respawn)
  5. @KainDepZai - Did you try my version Client-Side?
  6. Dimos7, for some reason I tested yours outputs a few errors, Also you forgot this -- 0 ,0 spawnTeam) Comma! And it outputs errors in console.
  7. local heath = getElementHealth ( source ) local playerTeam = getPlayerTeam ( source ) function respawn () if ( getTeamName(playerTeam) == "Assasin" ) and health < 0 then setElementPosition ( source, 0, 0, 5, 0, math.random (0,288), 0, 0, spawnTeam) outputChatBox("B?n dã du?c respawn", source, 255,0,0) giveWeapon(8,1) giveWeapon(1,1) else if ( getTeamName(playerTeam) == "Gunner" ) then setElementPosition ( source, 0, 0, 5, 0, math.random (0,288), 0, 0, spawnTeam) outputChatBox("B?n dã du?c respawn", source, 255,0,0) end end end addEventHandler("onClientResourceStart", root, respawn) Tried that in Client-Side, outputs no errors.
  8. SERVER SIDE function getPos() local account = getPlayerAccount(source) if (account) then local x,y,z = getElementPosition( source ) setAccountData( account, "save.position", x,y,z ) end end addEventHandler("onPlayerQuit", getRootElement(), getPos) function setPos() local account = getPlayerAccount(source) if (account) then local x,y,z = getAccountData( account, "save.position") if (position) then setElementPosition ( source, x, y, z ) end end end addEventHandler("onPlayerLogin", getRootElement(), setPos) Outputs no errors! Help!
  9. CLIENT SIDE --- Main Menu function showMenu() loginMenu = guiCreateWindow(338, 288, 338, 189, "RaysMTA Login v0.1", false) guiWindowSetSizable(loginMenu, false) infoLbl = guiCreateLabel(37, 21, 275, 27, "Welcome to the server, to get started please login/register below! \nYou can view our news by click the news button!\n", false, loginMenu) guiSetFont(infoLbl, "default-small") guiLabelSetColor(infoLbl, 41, 201, 52) usrLbl = guiCreateLabel(147, 55, 48, 15, "Username", false, loginMenu) guiSetFont(usrLbl, "default-small") usrEdit = guiCreateEdit(90, 66, 162, 21, "", false, loginMenu) passLbl = guiCreateLabel(147, 94, 48, 15, "Password", false, loginMenu) guiSetFont(passLbl, "default-small") passEdit = guiCreateEdit(90, 105, 162, 21, "", false, loginMenu) guiEditSetMasked(passEdit, true) loginBtn = guiCreateButton(10, 153, 69, 27, "Login", false, loginMenu) guiSetFont(loginBtn, "default-small") regBtn = guiCreateButton(260, 153, 69, 27, "Register", false, loginMenu) guiSetFont(regBtn, "default-small") newsBtn = guiCreateButton(137, 152, 68, 28, "News", false, loginMenu) guiSetFont(newsBtn, "default-small") showCursor(true) end addEventHandler("onClientResourceStart", getRootElement(), showMenu) --- Register Menu function regPlayer(button,state) if (button == "left" and state == "up") then if (source == regBtn) then username = guiGetText(usrEdit) password = guiGetText(passEdit) triggerServerEvent("acceptRegister", localPlayer, username, password) end end end addEventHandler("onClientGUIClick", getRootElement(), regPlayer) --- Login Menu function logPlayer(button,state) if (button == "left" and state == "up") then if (source == loginBtn) then username = guiGetText(usrEdit) password = guiGetText(passEdit) triggerServerEvent("acceptLogin", localPlayer, username, password) end end end addEventHandler("onClientGUIClick", getRootElement(), logPlayer) --- Disable Login Menu function closeMenu() guiSetVisible(loginMenu,false) showCursor(false) outputChatBox("You have successfully logged in!") end addEvent("hideMenu", true) addEventHandler("hideMenu", getRootElement(), closeMenu) SERVER SIDE --- Registering Event function regPlayer(username,password) if not username == "" then if not password == "" then local account = getAccount(username,password) if account == false then local addAcc = addAccount(username,password) if (addAcc) then triggerClientEvent(source,"hideMenu",getRootElement()) outputChatBox("You have successfully registered!", source) else outputChatBox("There was an error! Please contact an administrator!", source) end end end end end addEvent("acceptRegister",true) addEventHandler("acceptRegister",getRootElement(),regPlayer) --- Logging Event function logPlayer(username,password) if not username == "" then if not password == "" then local account = getAccount(username,password) if ( account ~= false ) then outputChatBox("You have successfully logged in!", source) triggerClientEvent(source,"hideMenu",getRootElement()) else outputChatBox("There was an error! Please contact an administrator!", source) end end end end addEvent("acceptLogin",true) addEventHandler("acceptLogin",getRootElement(),logPlayer) No errors are outputted, but GUI Appears successfully now, any help on how I can fix?
  10. What I suggest you do is try one of the steps below, 1. Restart/Start MTA Server 2. Check Logs 3. Reinstall Gameserver You should only have a host if you're experienced ( not saying you're not, you might be more experienced than me ), as the server I am currently hosting with APEX I had no problem until today, I think I have been with them for a couple of weeks now, I would 4-5 Weeks, nearly the end of my server.
  11. Post your PC/Laptop Specifications, to make other's jealous to show how powerful your PC/Laptop is! My Computer Specifications - RAM: 4 GB Hard Drive: 500 GB + External 500 GB CPU: AMD Phenom II X2 Processor @3.31 GHz Video: NVIDIA (EVGA) GT 610 1GB
  12. Thanks, the prefix - Do I have to change "You gamemode name | " to e.g. "MyGamemode"
  13. Well, I want to create a small gamemode but like DayZ ( Not zombies or DayZ ) Like when you change the gamemode name the gamemode stops working, any ideas how I can do this : ?
  14. I heard it's possiblE, Can anyone do this or, teach me or anything. I heard it's possible like compiling for the ARM Processor, I want to try it, ( I know it wont be powerful, but as I said just a test )
  15. Thank you for the tip Your awesome, and I really love your server! It's awesome, just you know like last need players But I am sure sooner or later you will get players like-myself I visit your server regularly now!
  16. Lol, Last time I ran big game modes on a similar VPS which I hosted 11 servers and they used to get 11 players above without
  17. How many servers can this machine handle? RAM: 3 GB Disk: 350 GB CPU: 4 Cores @ 2.67 GHz OS: Linux An estimate? Some say, 5, some say 20, some say 30 Can someone tell me an exact amount, or an estimate which is close enough as I don't want to overload the machine.
  18. Own servers, nice! Which ones, btw can you pm me your skype I miss you ;(
  19. BeaTzZ one question, What was your sponsor server called again ? I forgot, and I remember when I came in and fixed something. Probably it was MTA DayZ or RPG can't remember.
  20. Well, I don't share information online. But remember, when you hosted at the sponsor host? Game Sponsor or something
  21. Not really, it won't take years, It depends on how active you are and if you believe in yourself and say to yourself that you can do it. Than it'll take you less than a year ! : )
  22. BeATzZ trust me you do, I think I have you on my old skype lol.
×
×
  • Create New...