Jump to content

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


Recommended Posts

bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 end 
 end 
 ) 

ناقله

Link to comment
  • Replies 369
  • Created
  • Last Reply

Top Posters In This Topic

addEvent("register",true) 
addEventHandler("register",root, 
function(player,userName,Password) 
    if ( password ~= "" and password ~= nil ) then 
    local accountAdded = addAccount( getPlayerName(source), password ) 
    if ( accountAdded ) then 
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
bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 end 
 end 
 ) 

ناقله

كيف لين تظهر النافدة تخليه مايطلع الماوس

استبدل سطر 8 بـــــــــــــــــــــــــــــ

showCursor (true)

Link to comment
bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 end 
 end 
 ) 

ناقله

اختصر كذا ذذ

bindKey("F2","down", 
function() 
    guiSetVisible(Window,not guiGetVisible(Window)) 
    showCursor(guiGetVisible(Windiw)) 
    guiSetEnabled(guiGetVisible(Window)) 
    end 
) 

+ اذا بتاخذ اكواد جاهزه ما بتتعلم ذذ

Edited by Guest
Link to comment
bindKey ( "F2" , "down" , function() 
 if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then 
 guiSetVisible ( GUIEditor_Window[1] ,false ) 
 showCursor (false ) 
 guiSetInputEnabled(false) 
 elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then 
 guiSetVisible ( GUIEditor_Window[1] ,true ) 
 showCursor (false ) 
 guiSetInputEnabled(true) 
 end 
 end 
 ) 

ناقله

اختصر كذا ذذ

bindKey("F2","down", 
function() 
    guiSetVisible(Window,not guiGetVisible(Window)) 
    showCursor(guiGetVisible(Windiw)) 
    guiSetEnabled(guiGetVisible(Window),false) 
    end 
) 

+ اذا بتاخذ اكواد جاهزه ما بتتعلم ذذ

   guiSetEnabled(guiGetVisible(Window),false) 

:bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka:

Edited by Guest
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 
) 
  
  
addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  GUIEditor_Button[2] ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

Link to comment

Client :

addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  GUIEditor_Button[2] ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

Server :

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("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 
) 
  
  
addEventHandler ("onClientGUIClick", root, 
function() 
    if ( source ==  GUIEditor_Button[2] ) then 
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
    end 
end 
) 

:bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka::bazooka:

[15:14:00] ERROR: Client (ROx) triggered serverside event login, but event is not added serverside

يقول لك انت مسوي ترايقر و الترايقر مو محطوط في جهة السيرفر

Edited by Guest
Link to comment
كيف

يعني

l > L

addEventHandler ("onClientGUIClick", root, 
  
function() 
  
    if ( source ==  GUIEditor_Button[2] ) then 
  
        triggerServerEvent("login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
  
    end 
  
end 
  
) 

الى :

  
addEventHandler ("onClientGUIClick", root, 
  
function() 
  
    if ( source ==  GUIEditor_Button[2] ) then 
  
        triggerServerEvent("Login",getLocalPlayer(), guiGetText(user), guiGetText(pass)) 
  
    end 
  
end 
  
) 
Link to comment

طيب اذا كتبت الاسم والرقم صح ماتختفي النافذه

ليش؟

وكود REGISTER

addEvent("register",true) 
addEventHandler("register",root, 
function(player,userName,Password) 
    if ( password ~= "" and password ~= nil ) then 
    local accountAdded = addAccount( getPlayerName(source), password ) 
    if ( accountAdded ) then 
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

ABO-SR777777A @

سوي ترايقر للكلنت وسوي اخفاء للنافذه ذذ ,

triggerClientEvent 

+ احس انك نسخ ولصق وش جاب الكوماند ذذ

حطيته اول كذا ,

guiSetEnabled(guiGetVisible(Window))

لكن شفت الويكي ناقص ارقومنت ذذ

guiGetVisible(Window) 

:!::!::!::!::!::!:

guiElement

اقصد انه بالويكي ,

bool guiSetEnabled ( element guiElement, bool enabled )

توقعت انه لازم احط الحاله - true or false ._.

+ حطيت مثال على نافذه ذذ

Edited by Guest
Link to comment
ABO-SR777777A @

سوي ترايقر للكلنت وسوي اخفاء للنافذه ذذ ,

triggerClientEvent 

حطيته اول كذا ,

guiSetEnabled(guiGetVisible(Window))

لكن شفت الويكي ناقص ارقومنت ذذ

guiGetVisible(Window) 

:!::!::!::!::!::!:

guiElement

اقصد انه بالويكي ,

bool guiSetEnabled ( element guiElement, bool enabled )

توقعت انه لازم احط الحاله - true or false ._.

+ حطيت مثال على نافذه ذذ

وش يعني ترايقر

وشش يفيد هذا

حق وش

Link to comment

الترايقر فايدته انك تسوي شيء يكون بالسيرفر بس فـ ترسل ترايقر من الكنلت للسيرفر

واذا كان شيء كلنت وانت كودك سيرفر ترسل ترايقر من السيرفر للكنت ,

انت تسوي له بعد ما يسجل الدخول ,

triggerClientEvent( "Hide",root) 

+ تجيب الترايقر من الكلنت ,

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

    • No registered users viewing this page.

×
×
  • Create New...