Jump to content

تصحيح كود


Recommended Posts

Posted (edited)

السلام عليكم

انا ابي تصححولي هل كود تبع تسجيل دخول انا حطيت كل الاكواد فيه

بس ما عم يعطي الامر تفضلو

كلنت

  
GUIEditor = { 
    button = {}, 
    label = {}, 
    edit = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.button[1] = guiCreateButton(284, 282, 92, 46, "Login", false) 
  
  
        GUIEditor.button[2] = guiCreateButton(8, 401, 105, 40, "Register", false) 
  
  
        GUIEditor.label[2] = guiCreateLabel(233, 218, 107, 33, "UserName", false) 
  
  
        GUIEditor.label[3] = guiCreateLabel(233, 251, 119, 27, "PassWord", false) 
  
  
        GUIEditor.edit[1] = guiCreateEdit(290, 218, 101, 18, "", false) 
  
  
        GUIEditor.edit[2] = guiCreateEdit(289, 249, 101, 19, "", false) 
        guiEditSetMasked(GUIEditor.edit[2], true)     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawImage(0, 0, 800, 600, ":img/Hajola1", 0, 0, 0, tocolor(255, 255, 255, 255), false) 
    end 
) 
  
-- Show login window 
function showLoginWindow() 
    guiSetVisible(mainWindow, true) 
    guiSetVisible(registerWindow, false) 
    guiSetInputEnabled(true) 
    showCursor(true) 
    showPlayerHudComponent("all", true)  
end 
addEvent("showLoginWindow", true) 
addEventHandler("showLoginWindow",getRootElement(),showLoginWindow) 
  
-- Hide login window 
function hideLoginWindow() 
  
        guiSetInputEnabled(false) 
  
        guiSetVisible(mainWindow, false) 
  
        guiSetVisible(registerWindow, false) 
  
        showforallteam() 
  
end 
  
addEvent("hideLoginWindow", true) 
  
addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) 
  
  

سيرفر

-- Login handling 
function autologinPlayer(username,password) 
    if not (username == "") then 
        if not (password == "") then 
            local account = getAccount ( username, password ) 
            if not (account == false) then 
                logIn (source, account, password) 
                outputChatBox("#0000FF* #FFFFFFYou have been automatically logged in.",source,255,255,255,true) 
                setTimer(outputChatBox,1000,1,"#0000FF* #FFFFFFTo disable auto-login, use #ABCDEF/disableauto.",source,255,255,255,true) 
                triggerClientEvent ( source, "hideLoginWindow", getRootElement()) 
            else 
                outputChatBox ("#FF0000* #FFFFFFAuto-login error - Username & password do not match",source,255,255,255,true) 
            end 
        else 
            outputChatBox ("#FF0000* #FFFFFFAuto-login error - Failed to retrieve password",source,255,255,255,true) 
        end 
    else 
        outputChatBox ("#FF0000* #FFFFFFAuto-login error - Failed to retrieve username",source,255,255,255,true) 
    end 
end 

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

Edited by Guest
Posted

ما اشوف في كودك اي نوافذ و حتى افنت الضغط على زر مو موجود

مو موجود showforallteam فنكشن

عشان تسوي لها اظهار HUD انت ما اخفيت اي

showLoginWindow مو موجود تريقر بالأسم

loginPlayer ما فيه اي افنت يشغل الفنكشن

مو موجود OutPut فنكشن

Posted

فيه برنامج اسمه mta script editor

ذا حلو يعطيني كل الاخطاء بدي اتعلم عليه

اما بسئلك لو ما طلع لي ولا خطا تحت بيكون الكود 100 شغال ؟

Posted

طيب شوف ذا

الحين صنعته انه يعطي الفيب حركات كاراتيه

الكود

function VipStyle ( thePlayer ) 
if isObjectInACLGroup("user."..accName, aclGetGroup("[VIP]")) or isObjectInACLGroup("user."..accName, aclGetGroup("Developers")) then 
setPedFightingStyle(thePlayer,6) 
         end 
    end  
end 
addCommandHandler ( "setstyle",  VipStyle ) 
  

يقلي الخطا شوفه

'' expected near 'end'

Posted
function VipStyle ( thePlayer ) 
if isObjectInACLGroup("user."..accName, aclGetGroup("[VIP]")) or isObjectInACLGroup("user."..accName, aclGetGroup("Developers")) then 
setPedFightingStyle(thePlayer,6) 
         end 
    end 
addCommandHandler ( "setstyle",  VipStyle ) 

يعني البرنامج يحكي صحيح؟

Posted

debugscript 3 استخدم

setstyle إذا رحت تجرب كودك و كتبت في اف8

accName ما راح يشتغل كودك لانك ما عرفت

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...