Jump to content

Chaz-CR

Members
  • Posts

    222
  • Joined

  • Last visited

Everything posted by Chaz-CR

  1. Thanks guys. Fixed!
  2. Hello everybody, i was trying to add some labels to the screen about normal information (Location, Server Name, Fps and Ping). So I found out that they has guiGetScreenSize but when I change the resolution it seems weird. Not as I made it. So I wanted to know how to make the "maths" of this function to get the same place in different resolutions. CODE I MADE. addEventHandler("onClientRender", root, function() local sx,sy = guiGetScreenSize() dxDrawText("AGE Of BATTLES", sx*673/800, sy*550.5/600, sx*0/800, sy*0/600, tocolor(0, 109, 132, 255), 1.3, "pricedown", "left", false, false, false, false, false, false) end )
  3. Hello guys. I was wondering if you guys could help me a little bit with a resource that i have been editing (It's not mine), but i got the permissions to edit it so i was tring to clear it from the /debugscript 3 and i fixed it a little but i found some errors and i dont know how to fix it. When i commit a suicide, i received those messages. (IMAGE) IMAGE CODE function setLevel(killer) local leveld = getElementData(killer,"kill.level") local sleveld = getElementData(source,"kill.level") local klevel = getElementData(killer,"Level") local kills = getElementData(killer,"Kills") local deaths = getElementData(source,"Deaths") local points = getElementData(killer,"avail.points") if (killer) and getElementType(killer) == "player" and killer ~= source then setElementData(source,"Deaths",deaths + 1) if (killer) and getElementType(killer) == "player" and killer == source then return end if tonumber(sleveld) > 1 then setElementData(source,"kill.level",tonumber(sleveld)-math.random(1,10) ) else setElementData(source,"kill.level",0) end if tonumber(klevel) <= 9 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 9 and tonumber(klevel) <= 19 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 19 and tonumber(klevel) <= 29 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 29 and tonumber(klevel) < 39 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 39 and tonumber(klevel) < 49 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 49 and tonumber(klevel) < 59 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 59 and tonumber(klevel) < 69 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 69 and tonumber(klevel) < 79 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 79 and tonumber(klevel) < 89 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 89 and tonumber(klevel) < 94 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + math.random(1,2)) elseif tonumber(klevel) > 94 and tonumber(klevel) < 100 then triggerServerEvent("createText",killer) setElementData(killer,"kill.level",tonumber(leveld) + 1) end setElementData(killer,"Kills",kills + 0) triggerServerEvent("giveKillerMoney",killer) end end addEventHandler("onClientPlayerWasted",getRootElement(),setLevel) Thanks for the help BTW.
  4. Hello, i was making a gridlist where i can see the player nicknames but when i trigger the function i receive the accountName and i dont know how to change it to the PlayerName! There are the codes: function getPlayerKillsInOrder() theTable = {} for i, acc in ipairs(getAccounts()) do local name = getAccountName(acc) local kills = getAccountData(acc, "Kills") or 0 table.insert(theTable, {kills, name}) end ------not necessary the Trigger: addEvent("refreshList", true) addEventHandler("refreshList", root, function() triggerClientEvent(source, "onRequestRefresh", source, getPlayerKillsInOrder()) theTable = nil end)
  5. Try deleting all the resources from those servers and re-download them, some resource could make some trouble there.
  6. At least he shared his work to the community, he spend hours doing this and he is not selling any resource or script. PD: Good work making this gamemode!
  7. Therefore the TopBarChat is made by xXMADEXx, but anyways the script is not changed in anything, good work keep it up!
  8. Hey T-Bom I've been fine thanks. And i didn't know that. Those functions might be helpful in other resource I'm making, thanks for the help!
  9. Thanks man i solved it!
  10. So how the title says, i want to refresh the gridlist of the players when i open the panel, how can i do that? this is what i did with a loop. for id, playeritem in ipairs(getElementsByType("player")) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, playcol, string.gsub ( getPlayerName (playeritem), '#%x%x%x%x%x%x','' ), false, false ) end
  11. Now a stupid question, What is that?
  12. Hello guys, i was wondering how can i know the use of the ram of my server in the host because the support team of my host said i get time out because of the max use of the RAM and the ram of this host is 2GB!
  13. I'm testing this system in my server and sometimes the players lose his team (the founder) so the team is deleted, any bug there? No errors in the debugscript, sometimes the bug is in this line: function printManagment(player) if (player) then player = client end local group = getPlayerGroup(client) for ind, data in pairs(GAC) do if (data[1] == group) then local rank, warning, joined, lastTime = GAC[ind][2], GAC[ind][3],GAC[ind][4], GAC[ind][5] triggerClientEvent(client, "groupSystem.addToList", client, tostring(ind), rank, warning, joined, lastTime, "N/A", getAccountPlayer(getAccount(ind))) --Here is the error (Bad Argument @ getAccountPlayer) end end end addEvent("groupSystem.print", true) addEventHandler("groupSystem.print", root, printManagment)
  14. Gorgeous, is not a big surprise, your work is amazing everytime!
  15. Hello guys, i was trying to make a save system of the teams, and it works BUT when i remove a player of a team and he leaves from the server, when he login again he's still in the team i removed before he quit. Any help? function setTeam() local account = getPlayerAccount(source) local team = getAccountData (account, "team") if (team) and getTeamFromName(team) then setPlayerTeam(source, getTeamFromName(team)) end end addEventHandler("onPlayerLogin",root,setTeam) function save() local team = getPlayerTeam(source) local account = getPlayerAccount(source) if (team) and not isGuestAccount(account) then setAccountData(account, "team", getTeamName(team)) end end addEventHandler("onPlayerQuit", getRootElement(), save)
  16. Chaz-CR

    Causes of Lagg

    The lagg is in general, maybe because my server's slots are 50 and the server is 40+ players everyday!
  17. Chaz-CR

    Easy Help!

    I did this but it's still not working, some help? CLIENT addEventHandler ( "onClientElementDataChange", getRootElement(), function () if getElementType ( source ) == "player" then local localPlayerName = getPlayerName(getLocalPlayer()) guiSetText(Nickname, localPlayerName) guiSetText(TotalEXP, getElementData(localPlayer,"EXP")) guiSetText(Level, getElementData(localPlayer,"Level")) guiSetText(Clan,localPlayerName) guiSetText(BankMoney, getElementData(localPlayer,"Bank")) end end ) SERVER addEventHandler ( "onPlayerLogin", root, function ( ) for i, v in ipairs ( getElementsByType ( "player" ) ) do local acc = getPlayerAccount ( v ) setElementData ( v, "Bank", exports.Banco:getBankAccountBalance(v) ) setElementData ( v, "EXP", exports.exp_system:getPlayerEXP(v )) setElementData ( v, "Level", exports.exp_system:getPlayerLevel ( v )) if not getPlayerTeam ( v ) then return end local playerTeam = getPlayerTeam ( v ) setElementData ( v, "TeamName", getTeamName ( playerTeam ) ) end end )
  18. Chaz-CR

    Causes of Lagg

    Well I really dont know what causes lagg in my server and i wonder why i have too low FPS if i dont have visual mods installed (just 3 in the server), i use SQLite and accountData as databases and a vehicle system based in SQLite as well. So I'd like to know if you have some idea of what can reduce the lagg in a server. I have a site for Zombies wich uses slothbot too!
  19. When the dff and txd file is in the same carpet as the resource how can i call'em?
  20. Hello scripters, I'd like to know how can i make a system of visual mods but in a panel, so i mean for example: I create a gui with the mods and then when I press download mod, it will download the mod for me not when your join to the server for the first time! I know it's something about fetchRemote but i want to download the mod when i press some button in the panel or some like that, not when you are downloading the server. I hope you can undestand me
  21. Chaz-CR

    Easy Help!

    Solved, thanks to yall guys! Now i was wondering how can i upgrade the guiSetText each time the player opens the panel, because i made something like this but with money, so i need that when the player's cash ia changed the guiSetText can be changed as well. Thanks for the support!
  22. Chaz-CR

    Easy Help!

    Hello im trying to do something simple but i cannot. I want to get the account name of the player and put it in a gui, so i made this but doesnt work. CLIENT function AccName(thePlayer) guiSetText(AccName,tostring(triggerServerEvent("AccountName",resourceRoot))) end addEventHandler("onClientResourceStart", resourceRoot,AccName) SERVER function AccountName() getAccountName ( source ) end addEventHandler("AccountName",root,AccountName) addEvent("AccountName",true)
×
×
  • Create New...