Guest User

Untitled

a guest
May 23rd, 2012
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.67 KB | None | 0 0
  1. --MySQL START--
  2. handler = mysql_connect("localhost", "root", "", "linkmania")
  3. if ( not handler ) then
  4.   outputDebugString("Conexiune cu baza de date MySQL esuata!")
  5. else
  6.     outputDebugString("Conexiune cu baza de date MySQL reusita!")
  7. end
  8. --MySQL END--
  9. --Functii START--
  10. --Locatie Spawn START--
  11. local result = mysql_query(handler, "SELECT * FROM spawn_civil WHERE ID = 1")
  12. function spawn()
  13.     local row = mysql_fetch_assoc(result)
  14.     spawnPlayer(source, row.x, row.y, row.z)
  15.     fadeCamera(source, true)
  16.     setCameraTarget(source, source)
  17.     mysql_free_result(result)
  18. end
  19. addEventHandler("onPlayerJoin", getRootElement(), spawn)
  20. --Locatie Spawn END--
  21. --Functii END--
Advertisement
Add Comment
Please, Sign In to add comment