Advertisement
Guest User

Untitled

a guest
Jan 26th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. createTeam ( "Truckerzy", 0,100,0 )
  2. createTeam ( "Pomoc Drogowa", 139, 0, 139 )
  3. createTeam ( "Pogotowie", 32, 178, 170 )
  4. createTeam ( "Policja", 0, 0, 255 )
  5. createTeam ( "Taxi", 255, 255, 51 )
  6. createTeam ( "BP Ultimate", 0, 255, 0 )
  7. createTeam ( "Final Build", 220, 20, 60 )
  8. createTeam ( "Fresh Logistic", 255, 140, 0 )
  9.  
  10. function PlayerLogin(username,password,checksave)
  11. if not (username == "") then
  12. if not (password == "") then
  13. local account = getAccount ( username,password )
  14. if ( account ~= false ) then
  15. logIn(source, account, password)
  16. setCameraTarget(source, source)
  17. outputChatBox ("Gratulacje! Zalogowałeś się poprawnie!")
  18. triggerClientEvent (source,"Zacznij",getRootElement())
  19. toggleControl (source, "fire", false)
  20. toggleControl (source, "aim_weapon", false)
  21. end
  22. end
  23. end
  24. end
  25. addEvent("onRequestLogin",true)
  26. addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)
  27.  
  28. function registerPlayer(username,password,passwordConfirm)
  29. if not (username == "") then
  30. if not (password == "") then
  31. local account = getAccount (username,password)
  32. if (account == false) then
  33. local accountAdded = addAccount(tostring(username),tostring(password))
  34. if (accountAdded) then
  35. triggerClientEvent (source, "Zaloguj", root, source)
  36. else
  37. triggerClientEvent( source, "Konto_jest", root, source)
  38. end
  39. else
  40. triggerClientEvent ( source, "Nick_Konto", root, source)
  41. end
  42. else
  43. triggerClientEvent ( source, "Brak_Haslo", root, source)
  44. end
  45. else
  46. triggerClientEvent (source, "nick", root, source)
  47. end
  48. end
  49.  
  50.  
  51. addEvent("onRequestRegister",true)
  52. addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
  53.  
  54.  
  55. function playerLogin( thePlayer )
  56. end
  57. addEventHandler("onPlayerLogin", getRootElement(), playerLogin)
  58.  
  59. function playerJoin( thePlayer )
  60. spawnPlayer(thePlayer,0,0,0,0)
  61. end
  62. addEventHandler("onPlayerJoin", getRootElement(), playerLogin)
  63.  
  64. addEvent ("For_Spawn", true)
  65. addEventHandler ("For_Spawn", root,
  66. function ( plr )
  67. account = getAccount (username,password)
  68. if isObjectInACLGroup ( "user." .. account, aclGetGroup ( "Pomoc Drogowa" ) ) then
  69. plr:spawn (3128.9000244141 , -747.09997558594, 11.800000190735)
  70. setPlayerTeam(client,getTeamFromName("Pomoc Drogowa"))
  71. end
  72. end
  73. )
  74.  
  75. addEvent ("LV_Spawn", true)
  76. addEventHandler ("LV_Spawn", root,
  77. function ( plr )
  78. plr:spawn ( -1711.4000244141, 401.299987793, 7.800000190735)
  79. setPlayerTeam(client,getTeamFromName("Truckerzy"))
  80. end
  81. )
  82.  
  83. addEvent ("LS_Spawn", true)
  84. addEventHandler ("LS_Spawn", root,
  85. function ( plr )
  86. plr:spawn ( 1442.5999755859, -2285.8000488281, 13.5 )
  87. setPlayerTeam(client,getTeamFromName("Truckerzy"))
  88. end
  89. )
  90.  
  91. addEvent ("SF_Spawn", true)
  92. addEventHandler ("SF_Spawn", root,
  93. function ( plr )
  94. plr:spawn ( -1711.4000244141, 401.299987793, 7.800000190735 )
  95. setPlayerTeam(client,getTeamFromName("Truckerzy"))
  96. end
  97. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement