Jump to content

تصحيح كود


Recommended Posts

السلام عليكم

انا سويت كود

لما يدخل الاعب

تكون الشاشة سوداء و مايبدأ لعب ويطلع ليبل مكتوب الرجاء الأنتضار حتى ينتهي التحميل

ولما ينتهي التحميل ينحذف اليبل ويبدأ لعب

الكود

addEventHandler ("onClientPlayerJoin", getRootElement(), 
function() 
fadeCamera(false) 
showChat(true) 
end 
) 
  
aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler ( "onResourceStart", getRootElement(), 
function() 
fadeCamera(true) 
showChat(true) 
destroyElement(aa) 
end 
) 
  

Link to comment
اذا كنت تبيه وهو يحمل استخدم الافنت ذا https://wiki.multitheftauto.com/wiki/OnResourcePreStart

ماضبط

addEventHandler ("onResourcePreStart", getRootElement(), 
function() 
fadeCamera(false) 
showChat(true) 
end 
) 
  
aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler ( "onResourceStart", getRootElement(), 
function() 
fadeCamera(true) 
showChat(true) 
destroyElement(aa) 
end 
) 

Link to comment
اذا كنت تبيه وهو يحمل استخدم الافنت ذا https://wiki.multitheftauto.com/wiki/OnResourcePreStart

ماضبط

addEventHandler ("onResourcePreStart", getRootElement(), 
function() 
fadeCamera(false) 
showChat(true) 
end 
) 
  
aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler ( "onResourceStart", getRootElement(), 
function() 
fadeCamera(true) 
showChat(true) 
destroyElement(aa) 
end 
) 

onResourceStart - سيرفر وانت حاطه كلنت؟

Link to comment
اذا كنت تبيه وهو يحمل استخدم الافنت ذا https://wiki.multitheftauto.com/wiki/OnResourcePreStart

ماضبط

  

onResourceStart - سيرفر وانت حاطه كلنت؟

شوف احين

كلينت

aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler( "onClientResourceStart", getRootElement( ), 
function() 
destroyElement(aa) 
end 
) 

سيرفر

  
addEventHandler ("onPlayerJoin", getRootElement(), 
function() 
fadeCamera(false) 
showChat(true) 
end 
) 
  
  
addEventHandler ( "onResourceStart", getRootElement(), 
function() 
fadeCamera(true) 
showChat(true) 
end 
) 
  

Link to comment
aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler( "onClientResourceStart", getRootElement( ), 
    function() 
        guiSetVisible(aa,false) 
        --[[ 
        انت مسوي هنا 
        destroyElement 
        يعني راح يمسح لك الفاريبل حق اليبل 
        عشان تخفي النافذة استخدم 
        guiSetVisible(aa,false) 
        وعشان تظهرها استخدم 
        guiSetVisible(aa,true) 
        ]]  
    end 
) 

في ملف السيرفر انت مسوي

  
fadeCamera(true) 
fadeCamera(false) 

انت تبي تسوي الكاميرا تصير سوداء , بعدين ترجع صح ؟

استخدم

setTimer 

Link to comment
aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
guiSetFont(aa,"sa-header") 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler( "onClientResourceStart", getRootElement( ), 
    function() 
        guiSetVisible(aa,false) 
        --[[ 
        انت مسوي هنا 
        destroyElement 
        يعني راح يمسح لك الفاريبل حق اليبل 
        عشان تخفي النافذة استخدم 
        guiSetVisible(aa,false) 
        وعشان تظهرها استخدم 
        guiSetVisible(aa,true) 
        ]]  
    end 
) 

في ملف السيرفر انت مسوي

  
fadeCamera(true) 
fadeCamera(false) 

انت تبي تسوي الكاميرا تصير سوداء , بعدين ترجع صح ؟

استخدم

setTimer 

بدال

setTimer 

ظفه مع اخفاء اللبل

Link to comment

جرب ذا

addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

Link to comment
جرب ذا
addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

ماضبط

Link to comment
جرب ذا
addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

ضبط

Link to comment
جرب ذا
addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

ضبط

وش ضبط فيه

Link to comment

جرب كذآ احسن

client:

addEventHandler ("onClientPlayerJoin", localPlayer, 
    function() 
        showChat( false ) 
    end 
) 
  
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        showChat( true ) 
        triggerServerEvent("removeText", resourceRoot, localPlayer ) 
    end 
) 

Server:

addEventHandler('onPlayerJoin', root, 
    function( thePlayer ) 
        playerJoinWelcomeDisplay = textCreateDisplay ( ) 
        r, g, b = math.random( 0, 255 ), math.random( 0, 255 ), math.random( 0, 255 ) 
        playerJoinWelcomeDisplayText = textCreateTextItem ( "Please wait until the download Resource", 0.5, 0.5, "high", r, g, b, 255, 3, "center", "top") 
        textDisplayAddText ( playerJoinWelcomeDisplay, playerJoinWelcomeDisplayText ) 
        fadeCamera( thePlayer, false ) 
    end 
) 
  
addEvent("removeText", true) 
addEventHandler("removeText", resourceRoot, 
    function( thePlayer ) 
        setTimer( 
            function() 
                setTimer( textDisplayRemoveObserver, 50, 1, playerJoinWelcomeDisplay, thePlayer ) 
                fadeCamera( thePlayer, true ) 
            end 
        , 2000, 1 ) 
    end 
) 

Link to comment
جرب ذا
addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

ضبط

وش ضبط فيه

الكود حقة شغال

Link to comment
جرب ذا
addEventHandler ("onClientPlayerJoin", getRootElement(), 
    function() 
        fadeCamera(false) 
        showChat(false) 
    end 
) 
  
addEvent("onStart",true) 
addEventHandler("onStart",root, 
    function () 
        aa = guiCreateLabel(252,389,531,44,"Please wait until the download Resource",false) 
        guiSetFont(aa,"sa-header") 
    end 
) 
  
function changeLabelColor ( ) 
    guiLabelSetColor ( aa, math.random(0, 255), math.random(0, 255), math.random(0, 255) ) --- اللون 
end 
setTimer ( changeLabelColor, 1000, 0 ) 
  
addEventHandler("onClientResourceStart", getRootElement(), 
    function() 
        fadeCamera(true) 
        showChat(true) 
        guiSetText(aa,"") 
    end 
) 
  

-- server side --

addEventHandler("onResourcePreStart",resourceRoot, 
    function () 
        triggerClientEvent(source,"onStart",source) 
    end 
) 

ضبط

وش ضبط فيه

الكود حقة شغال

309865187.png

اذا ضبط معك ارفع لي المود

_____________________________________________________________

انا ابقاه مثل كذا وزيادة ليبل

918307647.png

Link to comment

LoL?

:? كل الردود الي بالموضوع مو دارين وين الله حاطهم

-- Server Side --

DownloadDisplay = textCreateDisplay() 
Text = textCreateTextItem("Please wait until the download Resource", 0.5, 0.5) 
textDisplayAddText(DownloadDisplay, Text) 
  
setTimer(function() 
    textItemSetColor(Text, math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 ) 
end,1000,0) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    textDisplayAddObserver(DownloadDisplay, source) 
    showChat(source, false) 
    fadeCamera(source, false) 
end) 
  
addEvent("onClientDownloadFinish", true) 
addEventHandler("onClientDownloadFinish", root, 
function() 
    if textDisplayIsObserver(DownloadDisplay, source) then 
        textDisplayRemoveObserver(DownloadDisplay, source) 
        showChat(source, true) 
        fadeCamera(source, true) 
    end 
end) 

-- Client Side --

Timer = setTimer( 
function() 
    if not isTransferBoxActive() then 
        triggerServerEvent("onClientDownloadFinish", localPlayer) 
        if isTimer(Timer) then killTimer(Timer) end 
    end  
end,1000,0) 

Link to comment
LoL?

:? كل الردود الي بالموضوع مو دارين وين الله حاطهم

-- Server Side --

DownloadDisplay = textCreateDisplay() 
Text = textCreateTextItem("Please wait until the download Resource", 0.5, 0.5) 
textDisplayAddText(DownloadDisplay, Text) 
  
setTimer(function() 
    textItemSetColor(Text, math.random(0, 255), math.random(0, 255), math.random(0, 255), 255 ) 
end,1000,0) 
  
addEventHandler("onPlayerJoin", root, 
function() 
    textDisplayAddObserver(DownloadDisplay, source) 
    showChat(source, false) 
    fadeCamera(source, false) 
end) 
  
addEvent("onClientDownloadFinish", true) 
addEventHandler("onClientDownloadFinish", root, 
function() 
    if textDisplayIsObserver(DownloadDisplay, source) then 
        textDisplayRemoveObserver(DownloadDisplay, source) 
        showChat(source, true) 
        fadeCamera(source, true) 
    end 
end) 

-- Client Side --

Timer = setTimer( 
function() 
    if not isTransferBoxActive() then 
        triggerServerEvent("onClientDownloadFinish", localPlayer) 
        if isTimer(Timer) then killTimer(Timer) end 
    end  
end,1000,0) 

كفووووووو والله

(صدقت في كلامك (كل الردود الي بالموضوع مو دارين وين الله حاطهم

:mrgreen::mrgreen::mrgreen::mrgreen:

مشكور على المساعدة ومنور اخوي توابل

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