Jump to content

موضوع للجميع انا زهقت قسسم


Recommended Posts

مدرري

يعني

لما تخش

انا اسوي نافذه

ويجيك

login

وتكتب اسمك والرقم السري

وتخش

وregister

تسجل

هات الفنكشن

--الدخول-- 
triggerServerEvent 
onClientGUIClick 
getAccount 
logIn 
--التسجيل-- 
getAccount 
addAccount 

طيب كيف اسوي

button 

انا لو سويت الاكواد فين احط اسم الزر عشان يدق عليه ويدخله

    function onClientClick (button, state, absoluteX, absoluteYe) 
      if (source == اسم الزر) then 
   --المتطلبات هنا-- 
    end 
    end 
    addEventHandler ("onClientGUIClick", اسم الزر, onClientClick) 

Link to comment
  • Replies 369
  • Created
  • Last Reply

Top Posters In This Topic

اها فهمت

اوك بسويها وارد لكم خبر

:?طبعاً ممكن تختصرها اذا كنت تحب الاختصار

addEventHandler ("onClientGUIClick", getRootElement(), 
function(button, state, absoluteX, absoluteY) 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), user, pass) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), user, pass) 
    end 
end 
) 

Edit:

function onClientClick (button, state, absoluteX, absoluteYe) 
      if (source == اسم الزر) then 
   --المتطلبات هنا-- 
    end 
    end 
    addEventHandler ("onClientGUIClick", اسم الزر, onClientClick) 

o.O:lol:

-_-"..?

Edited by Guest
Link to comment
اها فهمت

اوك بسويها وارد لكم خبر

:?طبعاً ممكن تختصرها اذا كنت تحب الاختصار

addEventHandler ("onClientGUIClick", getRootElement(), 
function(button, state, absoluteX, absoluteY) 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), user, pass) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), user, pass) 
    end 
end 
) 

addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

Link to comment
اها فهمت

اوك بسويها وارد لكم خبر

:?طبعاً ممكن تختصرها اذا كنت تحب الاختصار

addEventHandler ("onClientGUIClick", getRootElement(), 
function(button, state, absoluteX, absoluteY) 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), user, pass) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), user, pass) 
    end 
end 
) 

addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

local user = guiGetText(user) 
local pass = guiGetText(pass) 

Link to comment
ابي وضيفه اذا دخل الاعب السيرفر

يكون معه skin

"onPlayerSpawn" 
setElementModel 

مثال بسيط الكود معقد شوي

addEventHandler("onPlayerJoin", root, -- آلحدث .. عند آلدخول 
 function() -- وظيفة 
   setElementModel(source,46) -- نحط لللآعب شخصية 46 
 end -- آنهآء آلوظيفة 
) -- آنهآء آلحدث 

تم تغيير آلحدث !

Link to comment
addEventHandler("onPlayerJoin", root, -- آلحدث .. عند آلدخول 
 function() -- وظيفة 
   setElementModel(source,46) -- نحط لللآعب شخصية 46 
 end -- آنهآء آلوظيفة 
) -- آنهآء آلحدث 

تم تغيير آلحدث !

بسوي كود!

login and register

ابي الوضايف

وكود اذا دخل السيرفر

يكون لابس skin

ابي الوضايف

فقط

مابي

الكود جاهز

:?

Link to comment
addEventHandler("onPlayerJoin", root, -- آلحدث .. عند آلدخول 
 function() -- وظيفة 
   setElementModel(source,46) -- نحط لللآعب شخصية 46 
 end -- آنهآء آلوظيفة 
) -- آنهآء آلحدث 

تم تغيير آلحدث !

بسوي كود!

login and register

ابي الوضايف

وكود اذا دخل السيرفر

يكون لابس skin

ابي الوضايف

فقط

مابي

الكود جاهز

:?

قآلي ممكن مثآل -_-

آحسه صعب :roll:

Link to comment
فيه ناس تبي تورينا كيف هم حريفين برمجة ..

؟؟ :roll:

عطيته آلفنكشن وآلحدث آول ..

ومآ حآول :|

قآلي صعب , فـ عطيته آلكود جآهز :roll:

وآعرف آكتب زين -_-

Link to comment
فيه ناس تبي تورينا كيف هم حريفين برمجة ..

؟؟ :roll:

عطيته آلفنكشن وآلحدث آول ..

ومآ حآول :|

قآلي صعب , فـ عطيته آلكود جآهز :roll:

وآعرف آكتب زين -_-

ما تعطيه لين يحاول , واذا حاول وقال صححوا بعدين صحح له ._.

Link to comment

تم

الاخطأْ

addEvent("Login",true) 
addEventHandler("Login",root, 
function(player,userName,Password) 
getAccount ( username, password ) 
if ( GUIEditor_Label[13] ~= false ) then 
login ( Player, account, password ) 
        else 
outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) 
        end 
end 
addCommandHandler ( "login", loginPlayer ) 

Link to comment
تم

الاخطأْ

addEvent("Login",true) 
addEventHandler("Login",root, 
function(player,userName,Password) 
getAccount ( username, password ) 
if ( GUIEditor_Label[13] ~= false ) then 
login ( Player, account, password ) 
        else 
outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) 
        end 
end 
addCommandHandler ( "login", loginPlayer ) 

login > logIn

getAccount ( username, password ) 
if ( GUIEditor_Label[13] ~= false ) then 

>

local v = getAccount ( username, password ) 
if ( v ~= false ) then 

thePlayer > player

Link to comment

what?

addEvent("Login",true) 
addEventHandler("Login",root, 
function(player,userName,Password) 
local v = getAccount ( username, password ) 
if ( v ~= false ) then 
login ( Player, account, password ) 
        else 
outputChatBox ( "Wrong username or password!", thePlayer, 255, 255, 0 ) 
        end 
end 
addCommandHandler ( "login", loginPlayer ) 

اسم الزر هنا

addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  login ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    elseif ( source ==  register ) then 
        triggerServerEvent("register",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

Link to comment
addEvent("Login",true) 
addEventHandler("Login",root, 
    function(  userName,Password  ) 
        local v = getAccount ( username, Password ) 
            if ( v ~= false ) then 
                logIn ( client, v, Password ) 
        else 
                outputChatBox ( "Wrong username or password!", client, 255, 255, 0 ) 
        end 
end 
) 

Link to comment

الكود

الثاني

addEvent("register",true) 
addEventHandler("register",root, 
function(player,userName,Password) 
    if ( password ~= "" and password ~= nil ) then 
local v = getAccount ( username, password ) 
if ( v ~= false ) then 
Tell the user all is done 
outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login", source ) 
else 
outputChatBox ( "Error creating account, contact the server admin", source ) 
end 
else 
outputChatBox ( "Error creating account, correct syntax: /register ", source ) 
    end 
end 
addCommandHandler ( "register", registerPlayer ) 

Link to comment
الكود

الثاني

addEvent("register",true) 
addEventHandler("register",root, 
function(player,userName,Password) 
    if ( password ~= "" and password ~= nil ) then 
local v = getAccount ( username, password ) 
if ( v ~= false ) then 
Tell the user all is done 
outputChatBox ( "Thank you " .. getPlayerName(source) .. ", you're now registed, you can login with /login", source ) 
else 
outputChatBox ( "Error creating account, contact the server admin", source ) 
end 
else 
outputChatBox ( "Error creating account, correct syntax: /register ", source ) 
    end 
end 
addCommandHandler ( "register", registerPlayer ) 

password > Password

7 امسح سطر

و استخدم


وكودك خطاء مادري من وين ناسخنه

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...