Jump to content

AstroBurn

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

0 Neutral

About AstroBurn

  • Rank
    Square
  1. function onChatMessage ( _, theElement ) if ( getElementType ( theElement ) ~= "player" ) then cancelEvent ( ) end end addEventHandler ( "onChatMessage", root, onChatMessage ) I actually got it, thanks for the help but it's still that "onChatMessage" is done in server, and it does not cancel the client outputchatbox, or maybe because of some other reason. At least i finished by preventing most of the spam by just adding this: addEventHandler("onClientChatMessage",root, function (msg) if msg == "" or msg:find('www.',1,true) then cancelEvent(true) end end
  2. i tried this, and it does nothing, it looks like we can't cancel this event + i tested it and if im not wrong it doesn't detect client outputChatBox type /debugscript 3 then restart the resource that this code is in, and tell me the error message you got. I am not getting any error message, it's simply like i can't cancel this event I actually want to cancel scripts messages, not players ones
  3. i tried this, and it does nothing, it looks like we can't cancel this event + i tested it and if im not wrong it doesn't detect client outputChatBox
  4. Well thanks, but it's not helping me in any ways, when i try with the server , onChatMessage, i can't cancel this event, and it doesn't output Clients messages if anyone have an idea to help me
  5. Thx for the help, it actually works if i use the client event: function preventSpam() if not (getElementType(source) == "player") then cancelEvent() end end addEventHandler("onClientChatMessage", getRootElement(), preventSpam) But it cancel all the chatbox msg, probably because the event doesn't return the element's name i don' tknow how to fix that
  6. Hello, i wanted to prevent scripts or map to spam the chatbox with messages, so i removed the right with the acl "function.outputChatBox" access="false"> it's working well for the non-admin scripts, but I just can't do the same for the maps, i tried by removing the right to all the acls, but the in-map scritps can still use outputChatBox. Someone could help me please?
  7. sorry to up this thread again, your script is working well, but i can't make it works within the script itself, it just doesn't create a new accountName, or even if i make it byusing your command function, it doesn't load/save on it. I am using this for exemple: savePlayerData(source,"level",1) it should set the player's level to one, and create a column if there is none, but it don't do it
  8. Ah yeah it's working now, just some shit from me ^^ thx a lot for helping me.
  9. Well im sorry to bother you even more, but it's not adding a new account if the account doesn't exist in the userpanel database so i can't rly test it
  10. here it is local sqliteData = "accountName STRING, cash INT, mapsPlayed INT, mapsWon INT, everPurchasedNametagColor INT, level INT, unlockedAchievements INT, totalTimesJoined INT, totalHunters INT, totalToptimes INT, totalMoneyEarned INT, totalMoneySent INT, totalBets INT, totalBetsEarned INT, totalBetsWon INT, totalDeaths INT, totalPlayingTimeMinutes INT, totalPlayingTimeHours INT, totalReactionTests INT, bestReactionTime INT, ach1 INT, ach2 INT, ach3 INT, ach4 INT, ach5 INT, ach6 INT, ach7 INT, ach8 INT, ach9 INT, ach10 INT, ach11 INT, ach12 INT, ach13 INT, ach14 INT, ach15 INT, ach16 INT,
  11. addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() executeSQLCreateTable("userpanel", tostring(sqliteData)) end) and the table is fucking long x)
  12. tried, and in debugscript it's saying no such column (myaccountname) so with your code it's not adding new account but i appreciate your help
  13. i tried, but it's still making 219 records with the same accountName ...
  14. Datatype is the data info to be stored/loaded like savePlayerData(thePlayer,"cash",50000) "cash" is the datatype
  15. hello, i have never used database saving or sql, and i am stuck with this code, it's creating like 20 time my account, and it's not rly working could anyone help me ? function loadPlayerData (player,datatype) sourceAccount = getPlayerAccount ( player ) if isGuestAccount ( sourceAccount ) then return 0 else local playerIP = getAccountName (getPlayerAccount(player)) if (playerIP) then local playerRootNode = executeSQLQuery("SELECT accountName FROM userpanel WHERE accountName='"..playerIP.."'") if ( type( playerRootNode ) == "table") then local playerRoo
×
×
  • Create New...