Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. addEvent("playerWantToLogin",true)
  2. addEventHandler("playerWantToLogin",root,
  3. function(userName,Password, playerElement)
  4. if not (userName == "") then
  5. if not (Password == "") then
  6. fetchRemote("https://forum.fts-gaming.net/ftslogin_1337.php", function(response, erno, player, userName, Password)
  7. local response_ = fromJSON(response)
  8. --outputChatBox(response_)
  9. if response_ == 'fail' then
  10. triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Wrong login or password, try to log in again after few seconds.")
  11. elseif tonumber(response_) then
  12. loginPlayer(playerElement,tonumber(response_),userName,Password)
  13. end
  14. end, ('["%s","%s"]'):format(userName, Password), false, source, userName, Password);
  15. else
  16. triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Type a password")
  17. end
  18. else
  19. triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Type a login")
  20. end
  21. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement