Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PlayerLogin(username,password,checksave)
- if not (username == "") then
- if not (password == "") then
- local account = getAccount ( username,password )
- if ( account ~= false ) then
- logIn(source, account, password)
- setCameraTarget(source, source)
- triggerClientEvent (source,"Zacznij",getRootElement())
- toggleControl (source, "fire", false)
- toggleControl (source, "aim_weapon", false)
- end
- end
- end
- end
- addEvent("onRequestLogin",true)
- addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)
- function registerPlayer(username,password,passwordConfirm)
- if not (username == "") then
- if not (password == "") then
- local account = getAccount (username,password)
- if (account == false) then
- local accountAdded = addAccount(tostring(username),tostring(password))
- if (accountAdded) then
- triggerClientEvent (source, "Zaloguj", root, source)
- else
- triggerClientEvent( source, "Konto_jest", root, source)
- end
- else
- triggerClientEvent ( source, "Nick_Konto", root, source)
- end
- else
- triggerClientEvent ( source, "Brak_Haslo", root, source)
- end
- else
- triggerClientEvent (source, "nick", root, source)
- end
- end
- function onPlayerQuit ( )
- local playeraccount = getPlayerAccount ( source )
- if ( playeraccount ) and not isGuestAccount ( playeraccount ) then
- local skin = getElementModel ( source )
- setAccountData ( playeraccount, "skinz",skin )
- end
- end
- function onPlayerLogin (_, playeraccount )
- if ( playeraccount ) then
- local skin = getAccountData ( playeraccount, "skinz" )
- if ( skin ) then
- setElementModel ( source, skin )
- end
- end
- end
- addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit )
- addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
- addEvent("onRequestRegister",true)
- addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
- function playerLogin( thePlayer )
- end
- addEventHandler("onPlayerLogin", getRootElement(), playerLogin)
- function playerJoin( thePlayer )
- spawnPlayer(thePlayer,0,0,0,0)
- end
- addEventHandler("onPlayerJoin", getRootElement(), playerLogin)
- addEvent ("For_Spawn", true)
- addEventHandler ("For_Spawn", root,
- function ( plr )
- plr:spawn ( 13.96034, 1189.98108, 19.31405)
- end)
- addEvent ("LV_Spawn", true)
- addEventHandler ("LV_Spawn", root,
- function ( plr )
- plr:spawn ( 2080.88647, 1285.69531, 10.82031 )
- end
- )
- addEvent ("LS_Spawn", true)
- addEventHandler ("LS_Spawn", root,
- function ( plr )
- plr:spawn ( 1481.23022, -1749.44385, 15.44531 )
- end
- )
- addEvent ("SF_Spawn", true)
- addEventHandler ("SF_Spawn", root,
- function ( plr )
- plr:spawn ( -1938.75,883.62,40.21 )
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement