زايد عندك قوس
function greetingHandler ()
spawnPlayer ( source, 1459.01013 ,2773.25757, 10.82031, 270 ,287 )
setElementDimension ( source, 3 )
setCameraTarget ( source, source )
end
addEvent( "spawn", true )
addEventHandler( "spawn", root, greetingHandler )
-----
addEvent("onLogin", true)
addEventHandler("onLogin",root,
function (player, user, pass, NameAccount, Password)
showCursor ( true )
local account = getAccount ( user, pass )
if ( account ~= true ) then
if (logIn ( player, account, pass ) == true) then
outputChatBox ( "You Logged in Sucessfuly!", player, 255, 255, 0 , true )
triggerClientEvent (player, "Hidewindow", player)
else
outputChatBox ( "Login Error!", player, 255, 0, 0 )
end
else
outputChatBox ( "Wrong username or password!", player, 255, 0, 0 )
end
end
--
addEvent("onReg", true)
addEventHandler("onReg",root,
function ( player, user, pass, NameAccount, Password )
showCursor ( true )
local account = getAccount ( user, pass )
if ( account ~= false ) then
if (logIn ( player, account, pass ) == true) then
outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 )
triggerClientEvent (player, "Hidewindow", player)
else
outputChatBox ( "You Are Already Logged in !", player, 255, 255, 0 )
triggerClientEvent (player, "Hidewindow", player)
end
if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) >= 1 ) then
outputChatBox ( "You Can Register 1 time only", source, 255, 0, 0, true )
cancelEvent ( )
else
account = addAccount ( user, pass )
if (logIn ( player, account, pass ) == true) then
outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 )
triggerClientEvent (player, "Hidewindow", player)
else
outputChatBox ( "Register Error !", player, 255, 0, 0 )
end
end
end
)