Jump to content

وش الخطء بهالاكواد؟


Mbtdaa

Recommended Posts

السلام عليكم

وش الاخطاء بهالاكواد

1

كلينت

GUIEditor = { 
    staticimage = {}, 
    edit = {}, 
} 
button = {} 
GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 
  
  
 addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(GUIEditor.edit[1]) 
        local pass = guiGetText(GUIEditor.edit[2]) 
        if ( source == button.login ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onLogin",localPlayer,user,pass) 
            end 
        elseif ( source == button.register ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onRegister",localPlayer,user,pass) 
            end 
        end 
    end 
) 

سيرفر

  
  
addEvent("onLogin",true) 
addEventHandler("onLogin",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        if ( acc ) then 
            logIn(source,acc,pass) 
        else 
            outputChatBox("* Worng Username Or Password",source,255,0,0) 
        end 
    end 
) 
  
addEvent("onRegister",true) 
addEventHandler("onRegister",root, 
    function (user,pass) 
        local acc = getAccount(user,pass) 
        if ( acc ) then 
            outputChatBox("* This Account is Already Exist",source,255,0,0) 
        else 
            addAccount(user,pass) 
            outputChatBox("* You,re User : " .. user,source,255,255,255) 
            outputChatBox("* You,re Pass : " .. pass,source,255,255,255) 
        end 
    end 
) 
  
  

وبذي الاكواد كمان الله لايهينكم

كلينت

function createAdminTeamOnStart () 
    AdminTeam = createTeam ( " Race empier", 80, 255, 80 ) 
end 
addEventHandler("onResourceStart", resourceRoot, createAdminTeamOnStart) 
  
function setAdminTeam() 
if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Moderator")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("SuperModerator")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("lvl 1")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("lvl 2")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("lvl 3")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("lvl 4")) then 
setPlayerTeam(source, AdminTeam) 
else if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("lvl 5")) then 
setPlayerTeam(source, AdminTeam) 
         end 
      end  
   end 
end 
addEventHandler("onPlayerLogin",getRootElement(),setAdminTeam) 

سيرفر

function assignNewTeam ( source, commandName, teamName ) 
  local theTeam = createTeam ( teamName ) 
  if theTeam then 
    setPlayerTeam ( source, theTeam ) 
  end 
end 
addCommandHandler ( "gimmeateam", assignNewTeam ) 
  
function unassignTeam ( source, commandName ) 
  local theTeam = getPlayerTeam ( source ) 
  if theTeam then 
    setPlayerTeam ( source, nil ) 
  end 
end 
addCommandHandler ( "takeawaymyteam", unassignTeam ) 
Link to comment
طيب ممقن طلب اخوي ابي كود

لما يخش الاعب تظهرله صورة انا مسويها موب نافذة اذا ماعليك امر

كلنت

  
addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), ---اول مايشتغل الكلنت 
    function() 
        img1 = guiCreateStaticImage(10, 28, 250, 333, "images/1.png", false)     ---الصورة 
    end 
) 
  

Link to comment
يالغلا معليش طولت عليك بس انا مسوي صورة جاهزة مابي اسوي صورة ثانيه ><

اوكك لا تسوي صورة ثانية استخخدم هاذي

guiSetVisible 

?? وش ذآ خخ هو طلب هذا؟

اخوي الحين وش المطلوب؟ انت مسوي الصوره وشش ناقصك؟ :mrgreen:

وخل عنك نتف الاكواد xD

Link to comment
يالغلا معليش طولت عليك بس انا مسوي صورة جاهزة مابي اسوي صورة ثانيه ><

اوكك لا تسوي صورة ثانية استخخدم هاذي

guiSetVisible 

?? وش ذآ خخ هو طلب هذا؟

اخوي الحين وش المطلوب؟ انت مسوي الصوره وشش ناقصك؟ :mrgreen:

اعتقد انه مسوي صورة ويبغى تطلع للاعب اللي دخل !

اذا انا غلطان صححه :)

Link to comment

ابهمك وش المطلوب

انا مسوي صورة وفيها صور وازرار

المهم

ابي الاعب لما يخش السيرفر تجية النافذة

فقط

ولما يسجل او يسجل دخول تروح فقط

انا عندي الاكواد بس المشكلة الحين فيها لما يخخش الاعاب مايجيه شي

وذا الكود

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 
Link to comment
ابهمك وش المطلوب

انا مسوي صورة وفيها صور وازرار

المهم

ابي الاعب لما يخش السيرفر تجية النافذة

فقط

ولما يسجل او يسجل دخول تروح فقط

انا عندي الاكواد بس المشكلة الحين فيها لما يخخش الاعاب مايجيه شي

وذا الكود

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 

كذا ؟

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
guiSetVisible ( GUIEditor.staticimage[1], false ) 
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1])  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1])  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
  
addEventHandler("onClientPlayerJoin", getRootElement(), 
function () 
guiSetVisible ( GUIEditor.staticimage[1], true ) 
end ) 

Edited by Guest
Link to comment
ابهمك وش المطلوب

انا مسوي صورة وفيها صور وازرار

المهم

ابي الاعب لما يخش السيرفر تجية النافذة

فقط

ولما يسجل او يسجل دخول تروح فقط

انا عندي الاكواد بس المشكلة الحين فيها لما يخخش الاعاب مايجيه شي

وذا الكود

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 

كذا ؟

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
guiSetVisible ( GUIEditor.staticimage[1], false ) 
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1])  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1])  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
  
addEventHandler("onClientPlayerJoin", getRootElement(), 
function () 
guiSetVisible ( GUIEditor.staticimage[1], true ) 
end ) 

تستهبل انت addEventHandler("onClientPlayerJoin", getRootElement(),

function ()

guiSetVisible ( GUIEditor.staticimage[1], true )

end )

ماراح يطلع لك راح يطلب للاعبين اللي في الروم :lol:

Link to comment
ابهمك وش المطلوب

انا مسوي صورة وفيها صور وازرار

المهم

ابي الاعب لما يخش السيرفر تجية النافذة

فقط

ولما يسجل او يسجل دخول تروح فقط

انا عندي الاكواد بس المشكلة الحين فيها لما يخخش الاعاب مايجيه شي

وذا الكود

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 

كذا ؟

GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, ":guI/images/examples/logo.png", false) 
guiSetVisible ( GUIEditor.staticimage[1], false ) 
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "/images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1])  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1])  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
  
addEventHandler("onClientPlayerJoin", getRootElement(), 
function () 
guiSetVisible ( GUIEditor.staticimage[1], true ) 
end ) 

تستهبل انت addEventHandler("onClientPlayerJoin", getRootElement(),

function ()

guiSetVisible ( GUIEditor.staticimage[1], true )

end )

ماراح يطلع لك راح يطلب للاعبين اللي في الروم :lol:

كيف مافهمت يعني يطلع لكل الاعبين ؟

Link to comment

الكلينت

GUIEditor = { 
    staticimage = {}, 
    edit = {}, 
} 
button = {} 
GUIEditor.staticimage[1] = guiCreateStaticImage(388, 185, 560, 484, "images/logo.png", false) 
  
GUIEditor.staticimage[2] = guiCreateStaticImage(14, 88, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[4] = guiCreateStaticImage(14, 256, 110, 86, "images/login.png", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[1] = guiCreateEdit(139, 127, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.edit[2] = guiCreateEdit(139, 289, 325, 43, "", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[5] = guiCreateStaticImage(100, 0, 392, 124, "images/user.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[6] = guiCreateStaticImage(139, 180, 326, 109, "images/pass.png", false, GUIEditor.staticimage[1]) 
GUIEditor.staticimage[7] = guiCreateStaticImage(38, 364, 133, 111, "images/password.png", false, GUIEditor.staticimage[1]) 
  
button.login = guiCreateButton(-0.32, -0.40, 2.26, 1.72, "", true, GUIEditor.staticimage[7]) 
guiSetAlpha(button.login, 0.00) 
  
GUIEditor.staticimage[8] = guiCreateStaticImage(397, 363, 131, 111, "images/regsiter.png", false, GUIEditor.staticimage[1]) 
  
button.register = guiCreateButton(-22, -6, 258, 155, "", false, GUIEditor.staticimage[8]) 
guiSetAlpha(button.register, 0.00) 
  
  
 addEventHandler("onClientGUIClick",root, 
    function () 
        local user = guiGetText(GUIEditor.edit[1]) 
        local pass = guiGetText(GUIEditor.edit[2]) 
        if ( source == button.login ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onLogin",localPlayer,user,pass) 
            end 
        elseif ( source == button.register ) then 
            if string.len(user) > 0 and string.len(pass) > 0 then 
                triggerServerEvent("onRegister",localPlayer,user,pass) 
            end 
        end 
    end 
) 

الميتا

<meta> 
    <info author="xD" type="script" name="xe" version="1.3" /> 
   
    <script src="server.lua" type="server" /> 
    <script src="client.lua" type="client" /> 
                   <file src="images/login.png"/> 
                   <file src="images/user.png"/> 
                   <file src="images/regsiter.png"/> 
                   <file src="images/password.png"/> 
                   <file src="images/pass.png"/> 
                   <file src="images/logo.png"/>     
  
</meta> 
     
  

Link to comment
لاقصدي كل مايخش لاعب الروم

تطلع لك النافذة

يعني كل ماخش واححد طلعت لك ض2

ضض1 هذا اككثر شي يواجهني ككيف اصلحها ؟

لاتستخدم ذا الحدث

onClientPlayerJoin

استخدم هذ ا الحدث

addEventHandler('onClientResourceStart', getResourceRootElement(getThisResource()), 
    function() 
  
-----your Code 
    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...