Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- addEvent("playerWantToLogin",true)
- addEventHandler("playerWantToLogin",root,
- function(userName,Password, playerElement)
- if not (userName == "") then
- if not (Password == "") then
- fetchRemote("https://forum.fts-gaming.net/ftslogin_1337.php", function(response, erno, player, userName, Password)
- local response_ = fromJSON(response)
- --outputChatBox(response_)
- if response_ == 'fail' then
- triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Wrong login or password, try to log in again after few seconds.")
- elseif tonumber(response_) then
- loginPlayer(playerElement,tonumber(response_),userName,Password)
- end
- end, ('["%s","%s"]'):format(userName, Password), false, source, userName, Password);
- else
- triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Type a password")
- end
- else
- triggerClientEvent(playerElement,'playerLogingAnswer',playerElement,playerElement,false,"Type a login")
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement