Jump to content

تصحيح كود


Recommended Posts

السلام عليكم

عندي مشكلة بهذي الاكواد

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 
) 
  
  

الدي بق يقول :

server.lua:6 unexpected symbol near ')'

Link to comment

زايد عندك قوس

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 
) 
  
  
Link to comment
زايد عندك قوس

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 
) 
  
  

جربت امسح القوس قبلك لكن يظهر لي بالدي بوق

server.lua:28 ')' expected (to close '(' at line 10 ) near 'addEvent'

-.- احط اند نفس الشي يجيني :@

Link to comment
السلام عليكم

عندي مشكلة بهذي الاكواد

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 
) 
  
  

الدي بق يقول :

server.lua:6 unexpected symbol near ')'

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 
) -- ناقص قوس هنا  حق اغلاق حدث ["onLogin"] 
  
-- 
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 
) 
Link to comment
السلام عليكم

عندي مشكلة بهذي الاكواد

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 
) 
  
  

الدي بق يقول :

server.lua:6 unexpected symbol near ')'

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 
) -- ناقص قوس هنا  حق اغلاق حدث ["onLogin"] 
  
-- 
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 
) 

نفس الشي -_-"

Link to comment

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 ) 
            if ( #getAccountsBySerial ( getPlayerSerial ( player ) ) > 0 ) then 
                outputChatBox ( "You Can Register 1 time only", source, 255, 0, 0, true ) 
                cancelEvent ( ) 
            else 
                account = addAccount ( user, pass ) 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) 
                triggerClientEvent (player, "Hidewindow", player) 
                logIn ( player, account, pass ) 
            end 
    end 
) 
  
  
  

جرب الحين حبيبي

Edited by Guest
Link to comment
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 
) 
  
  

جرب الحين حبيبي

نفس المشكلة ونفس الخطا بالدي بق

Link to comment
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 
) 
  
  

جرب الحين حبيبي

نفس المشكلة ونفس الخطا بالدي بق

عدلته شوفه ._.

Link to comment

لكن سؤال

الحين انا حاط

if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) >= 1 ) then 
                outputChatBox ( "You Can Register 1 time only", source, 255, 0, 0, true ) 
                cancelEvent ( ) 

بأكواد التسجيل

كذا يصير ؟

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 ) 
            end 
            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 
) 

يعني كذا يصير يخليه ما يسجل بس حساب واحد

Link to comment
لكن سؤال

الحين انا حاط

if ( #getAccountsBySerial ( getPlayerSerial ( source ) ) >= 1 ) then 
                outputChatBox ( "You Can Register 1 time only", source, 255, 0, 0, true ) 
                cancelEvent ( ) 

بأكواد التسجيل

كذا يصير ؟

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 ) 
            end 
            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 
) 

يعني كذا يصير يخليه ما يسجل بس حساب واحد

الحين اعدله لك كامل , انا عدلت المشكله بس

Link to comment

كود التــســـجيل بعــد التعــديل

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 ) 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) 
                triggerClientEvent (player, "Hidewindow", player) 
            end 
        end 
    end 
) 
  
Link to comment
كود التــســـجيل بعــد التعــديل
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 ) 
                outputChatBox ( "You Registerd and Logged in Sucessfuly!", player, 255, 255, 0 ) 
                triggerClientEvent (player, "Hidewindow", player) 
            end 
        end 
    end 
) 
  

انا من زمان مسوي حساب تقدر تجي سيرفري نجربه ؟ اذا تقدر برسل لك الايبي والباس خاص

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...