Jump to content

طلب كود


Recommended Posts

Posted

السلام عليكم

ابي كود أو مود ما ادري وش هو بالظبط

بس الزبدة الوظيفة هي

انه يقدر اللاعب يكتب كل 5 ثواني

لسرفرات الي لاعبينها كثار مثلا

تلاقي لما تكتب يقولك تبقى 5 ثواني

تكتب بعد ثانيتين يقولك تبقى 3 ثواني

في نا قالولي استخدم كود

settimer

وقال احطه في ملف السرفر حقي

دورت ذا الملف الي اسمه server

ما لقيته

ارجو التوضيح والافادة

Posted

اول شي هذا ملف سيرفر مو كود

الاكواد تنقسم لـ قسمين .. قسم بجانب كلنت وقسم بجانب سيرفر

اللي راح تحتاجه عشان تسوي طلبكـ .. بجانب سيرفر طبعا

Event: "onPlayerChat"

isTimer 
getTimerDetails 
setTimer 

To Contact Me at Skype : [email protected]

Posted

ابيه يكرر كل 6 ثواني بستخدم زي كذا

setTimer (,60000,0) 

يتعلق بتفاصيل الشات او ما شابه مثل اسم تعريف التايمر

getTimerDetails 

يمكن حق الربط

setTimer 

Posted

اخي الامثلة معقدة نوعا ما

كل ما فهمته هو setTimer

وisTimer

اسف عذبتك معي

لكن اذا تكرمت

افضل ان يكون الشرح منك

Posted

" onPlayerChat " هذا حدث إرسال رسائل بالشات

" getTimerDetails " أستخدمه لمعرفة كم تبقى لتستطيع الكتابة

" setTimer " استخدم التايمر لتحديد مده منع الكتابة

حاول تسوي الكود .. وبنساعدك

 

 

Posted

طيب ياخي ليش ما تحبون الخير

كتبتو تعليق وعذبتو نفسكم

وش بقي على انكم تسوو الكود

لو ما كسبتو فلوس علمتو شخص وكسبتو دعائه

بس والله ما عاد في ناس فيها خير ذي الايام

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
end 
end  
) 

 My new GCSS Script : Go 
حصريا : مود الدردشة بين السيرفرات : الذهاب

LUA progress = -100%

Join us :

 Multi Theft Auto Arab 

I'm not the best but, i'm different

Skype : kamel1234128

Someone in this world needs to remember my love .

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    if isTimer ( Timer ) then 
    leftT , executeR, Texecute = getTimerDetails(Timer) 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then 
    Timer = setTimer (function() 
end, 5000, 1) 
end 
end  
) 

ياخي انت انت مدري وش بقول

قسم بالله انك ذيبان

الله يوفقك في كل عمل انشاء الله

وتكون من افضل مبرمجين العالم

اما كذا الناس او بلا

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    if isTimer ( Timer ) then 
    leftT , executeR, Texecute = getTimerDetails(Timer) 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then 
    Timer = setTimer (function() 
end, 5000, 1) 
end 
end  
) 

ياخي انت انت مدري وش بقول

قسم بالله انك ذيبان

الله يوفقك في كل عمل انشاء الله

وتكون من افضل مبرمجين العالم

اما كذا الناس او بلا

حياك الله في أي وقت :wink:

 My new GCSS Script : Go 
حصريا : مود الدردشة بين السيرفرات : الذهاب

LUA progress = -100%

Join us :

 Multi Theft Auto Arab 

I'm not the best but, i'm different

Skype : kamel1234128

Someone in this world needs to remember my love .

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    if isTimer ( Timer ) then 
    leftT , executeR, Texecute = getTimerDetails(Timer) 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then 
    Timer = setTimer (function() 
end, 5000, 1) 
end 
end  
) 

ياخي انت انت مدري وش بقول

قسم بالله انك ذيبان

الله يوفقك في كل عمل انشاء الله

وتكون من افضل مبرمجين العالم

اما كذا الناس او بلا

حياك الله في أي وقت :wink:

بس لا هنت احط ذا الكود وين؟

Posted

سوي ملف

Server.lua

وحط فيه الكود

وسوي ملف ميتا

وحطهم بملف مضغوط

zip

وشغله ^^

 My new GCSS Script : Go 
حصريا : مود الدردشة بين السيرفرات : الذهاب

LUA progress = -100%

Join us :

 Multi Theft Auto Arab 

I'm not the best but, i'm different

Skype : kamel1234128

Someone in this world needs to remember my love .

Posted
سوي ملف

Server.lua

وحط فيه الكود

وسوي ملف ميتا

وحطهم بملف مضغوط

zip

وشغله ^^

المود شغال 100%

يعطيك العافية ما قصرت

بس لما تطلع الرسالة

يقولي

يرجى الانتظار 3.345 ثواني

انا ابيها

يرجى الانتظار

5 ثواني

بعدين 4 ثواني

يعني من دون فاصلة بس عدد صحيح

Posted

addEventHandler( 'onPlayerChat', getRootElement(), 
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. math.floor(leftT / 1000) .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
end 
end 
) 

Skype: ahmed.ronaldo2122

اعتزال لبعض الوقت

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
end 
end  
) 

تتحقق من القيمة نفسها ؟

حط else على الاقل

مب تحط اذا الكلمة تساوي نفس الكلمة

يعني بوريك مثال للي انت سويته

function Any (msg) 
if msg == msg then -- wtf !!!!! 
print("did You drink something ?") 
end 
end 
Any("LoOs is cool") 

غير كذا كيف تحول سترنق لسترنق ؟ :roll:

Discord: LoOs#1111

_____________________________

76561198299431254.png

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
end 
end  
) 

تتحقق من القيمة نفسها ؟

حط else على الاقل

مب تحط اذا الكلمة تساوي نفس الكلمة

يعني بوريك مثال للي انت سويته

function Any (msg) 
if msg == msg then -- wtf !!!!! 
print("did You drink something ?") 
end 
end 
Any("LoOs is cool") 

غير كذا كيف تحول سترنق لسترنق ؟ :roll:

addEventHandler( 'onPlayerChat', getRootElement(), 
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
else return  
end 
end 
) 

كذا يعجبك ؟

:lol::lol::lol:

 My new GCSS Script : Go 
حصريا : مود الدردشة بين السيرفرات : الذهاب

LUA progress = -100%

Join us :

 Multi Theft Auto Arab 

I'm not the best but, i'm different

Skype : kamel1234128

Someone in this world needs to remember my love .

Posted
addEventHandler( 'onPlayerChat', getRootElement(),  
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
end 
end  
) 

تتحقق من القيمة نفسها ؟

حط else على الاقل

مب تحط اذا الكلمة تساوي نفس الكلمة

يعني بوريك مثال للي انت سويته

function Any (msg) 
if msg == msg then -- wtf !!!!! 
print("did You drink something ?") 
end 
end 
Any("LoOs is cool") 

غير كذا كيف تحول سترنق لسترنق ؟

addEventHandler( 'onPlayerChat', getRootElement(), 
function ( msg ) 
    local timerT = 5000 -- Timer time to do . 
    if isTimer ( Timer ) then -- if the timer not stopped then do : 
    leftT , executeR, Texecute = getTimerDetails(Timer) -- get Timer Remaining Time 
    outputChatBox('#Please wait' .. leftT / 1000 .. ' seconds to can say in chat again', source, 255,0,0, true) 
    cancelEvent() 
    return end 
    if ( msg == tostring(msg) ) then -- if player said in the chat then set Timer 
    Timer = setTimer (function() 
end, tonumber(timerT), 1) 
else return  
end 
end 
) 

كذا يعجبك ؟

:lol::lol::lol:

مش اقصد كذا ياخطير ،

اقصد تشيل التحقق الثاني وتستبدله ل else للتحقق السابق :lol:

Discord: LoOs#1111

_____________________________

76561198299431254.png

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