Jump to content

MisterQuestions

Members
  • Posts

    460
  • Joined

  • Last visited

Everything posted by MisterQuestions

  1. Hi, on this time i want to show player team over nick, but what is wrong, if dont get the player team, should appear a random phrase how to do it? Client-Side local team = getElementData(player, "team") or " " dxDrawText (team.." \n"..getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, raceInterface.font, "center", "bottom", false, false, false, true ) Server-Side addEventHandler( 'onPlayerLogin', root, function ( ) team = getPlayerTeam(source) setElementData(source, "team", team) end ) addEventHandler( 'onPlayerQuit', root, function ( ) local team = getElementData(source, "team") if team then removeElementData(source,"team") end end) How to do it?
  2. function ComandoNametag() setPlayerNametagShowing(source, true) else setPlayerNametagShowing(source, false) end addCommandHandler("show", ComandoNametag) And what is wrong here?
  3. Bad argument @addEventHandler [Expected element at argument 2 got nil]
  4. Hi! im making a simple script... but doesnt work fine... function setCameraOnPlayerJoin() fadeCamera(source, true, 5) setCameraMatrix(source, 1468.8785400391, -919.25317382813, 100.153465271, 1468.388671875, -918.42474365234, 99.881813049316) end addEventHandler("onPlayerJoin", getRootElement(), setCameraOnPlayerJoin) function IsLoged() setCametaTarget(source) end addEventHandler("onPlayerLogin", getRootElement(), IsLoged) When player joins, it set the camera to vinewood sing, but when logins i want to set to the player doesnt work, why?
  5. What does this do? for placeNumber,sound in ipairs(theSounds) do
  6. Hi, im mi userpanel, it hads a window that plays music, but when it plays sounds like static or something like that, Why? any way to fix it?
  7. so if it will be like this...?? local gMap = exports.mapmanager:getRunningGamemodeMap() local mapRoot = getResourceRootElement(gMap) theSound = getElementsByType("sound", mapRoot) setSoundVolume(theSound, 0.5)
  8. Mmmm...And how to set the volume to 50% or less?
  9. no, i refer when a player die's update the alive players in team
  10. yes like when next map starts, get alive players in team, and if one dies update the alive players on team text
  11. And last...how to keep update the alive playes on the team??
  12. No i refer from htm color code like "ff0000" how to make when i click set it update the dxText color?
  13. so i will put a event onClientGUIClick for the buttons and its possible to make that on a dxText set the color from a editbox? Like i have created a editbox for the color, how i should use it to when i click set getText and aply color to the dxDrawed Text?
  14. Mmm a question...how to send the text of the editbox to the server side to create the team
  15. Mmm a question...how to send the text of the editbox to the server side to create the team
  16. Hi! on this time im creating a CW Script...And i need some help, like in the cw admin panel, they are 2 boxes for the teams, and 2 for the color.So you should put the names Like: TeamBox1 = TeamName1 ColorBox1= #ff9e00 How to make when you click on set, creates the teams with the color?
  17. its by a separated resource and this is the table... local infoDatabase = { tableName = "TC_Map_info", tableStructure = { {"mapName","TEXT DEFAULT '' NOT NULL"}, {"author","TEXT DEFAULT '' NOT NULL"}, {"created","TEXT DEFAULT '' NOT NULL"}, {"lastTimePlayed","INT(6) DEFAULT 0 NOT NULL"}, {"playedCount","INT(6) DEFAULT 0 NOT NULL"}, {"toptimes","INT(6) DEFAULT 0 NOT NULL"}, {"hunters","INT(6) DEFAULT 0 NOT NULL"}, {"kills","INT(6) DEFAULT 0 NOT NULL"}, {"assists","INT(6) DEFAULT 0 NOT NULL"}, } }
  18. I got a new error..... And say's attempt to index global 'infoDatabase' (a nil value) lua:15: function onResourceInfoStart() dbConnectTable.connect = dbConnect("mysql","dbname="..dbConnectTable.table..";host="..dbConnectTable.ip, dbConnectTable.user, dbConnectTable.password) if dbConnectTable.connect then checkMySQLTable(dbConnectTable.connect,infoDatabase.tableName,infoDatabase.tableStructure) commandSystemMySQLInit() likeSystemDatabaseInit() end end
  19. Mmm work's ! no errors now, but what was the error?
  20. Now say's Unexpected symbol near ','
  21. Hi i got an error from the script and says 'unexpected symbol near ';' Code: mysqlconnect = {user=; connect=; password=; database=;} dbConnectTable = { connect = false, user = "user", password = "", ip = "thehost", table = "table", } whats wrong??
  22. Hey all....i got an error from this login... can you tell me whats wrong?? Client-Side addEventHandler ( "onClientClick", getRootElement(), function ( button, state, px, py ) if ( button == "left" and state == "down" ) then if ( px > x*0.382 and px < x*0.555 and py > y*0.719 and py < y*0.79 ) then if ( isLoginActive ) then playSound("Sounds/button1.mp3", false) local user = guiGetText( Login_User ) local pass = guiGetText( Login_Password ) if ( user ~= "" and pass ~= "" ) then triggerServerEvent("player:register", getRootElement(), getLocalPlayer(), user, pass) end Server-Side function server.register (thePlayer, Username, Password) if ( thePlayer ~= "" and Username ~= "" and Password ~= "" ) then addAccount( Username, Password ) triggerClientEvent( thePlayer, "player:loginNotification", getRootElement(), true ) triggerClientEvent( thePlayer, "server:note", getRootElement(), "success", "You successfully registered") return true else triggerClientEvent( thePlayer, "server:note", getRootElement(), "error", "Error on register") triggerClientEvent( thePlayer, "player:loginNotification", getRootElement(), false ) return false end end
×
×
  • Create New...