Jump to content

sconer

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by sconer

  1. sconer

    black screen

    don't work. what doesn't work ? I removed it, but still when i connect there is a black screen.
  2. sconer

    black screen

    Hello, i have a problem. When i connect to server there was a black screen. In my gamemode script i typed, to spawn player, but it don't spawn: local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() mysqlconnect() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function mysqlconnect() handler = mysql_connect("localhost", "root", "", "crpmta") -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString("Unable to connect to the MySQL server") else mysql_close(handler) -- Close the connection end end function spawn(player) if not isElement(player) then return end playername = getPlayerName(player); outputChatBox("Sveiki atvykę" .. playername, player) spawnPlayer (player, 833.6880,-4476.9326,3.0984,90,0) setElementModel(player,72) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end addEventHandler("onPlayerJoin", root, function() spawn(player) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, player) end )
  3. sconer

    in what event

    Hello, i want to connect to mysql in my server. But i don't know what eventhandler i need to call to connect to the mysql. Who knows please reply to this thread. Thanks. function mysqlconnect() handler = mysql_connect("localhost", "root", "", "crpmta") -- Establish the connection if ( not handler ) then -- The connection failed outputDebugString("Unable to connect to the MySQL server") else mysql_close(handler) -- Close the connection end end
×
×
  • Create New...