Jump to content

سوال .


Adham

Recommended Posts

سلام عليكم كل م اجي اشغلمود msgbox

واحط كوده في كلنت

الهوا ده :

function show(msg)
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK")
end
واحط  

show("doma" ) مثلا

اجي اروح السرفر

يجي بي الدبي بق

call: failed to call 'msgbow:guiShowMessageBox' [string "?"]

المشكله دي صارت معي اكتر من مره وما عارف احلها 

Link to comment
  • Scripting Moderators

يمكن اسم الفكشن بـ مسج بوكس غلط او غير معرف ب الميتا

Edited by xNawaf
Link to comment

مود المسج : الكود

MsgBoxWindow = {}
MsgBoxText = {}

MsgBoxWindow = guiCreateWindow(0.3984,0.3841,0.2061,0.1901,"Info",true)
guiSetAlpha(MsgBoxWindow,0.8)
MsgBoxText = guiCreateLabel(0.1991,0.2808,0.5498,0.4726,"",true,MsgBoxWindow)
guiSetVisible(MsgBoxWindow, false)
showCursor(false)

function newmsgbox(co)
guiSetVisible(MsgBoxWindow, true)
guiSetText(MsgBoxText, tostring(co))
showCursor(false)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.70000000000000) end, 300, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.60000000000000) end, 700, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.50000000000000) end, 1000, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.40000000000000) end, 1300, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.30000000000000) end, 1500, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.20000000000000) end, 1800, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.10000000000000) end, 2000, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.00000000000000) end, 2300, 1)
setTimer(function() guiSetVisible(MsgBoxWindow, false) end, 2300, 1)
end

addEvent("msgBoxInfo", true)
addEventHandler("msgBoxInfo", getRootElement(), newmsgbox)

الكود لحطه في مود اخر 

عشان تطلع لوحه

function show(msg)
    exports.msgbox:guiShowMessageBox(msg,"error","Error",false,"OK")
end

 

show("adham")

تعريف الميتا :

<include resource="msgbox" />
Link to comment
  • Scripting Moderators
27 minutes ago, Deativated said:

ي حبيبي م في اكواد سرفر ؟

الاكواد كلها قدامك 

النت فصل تاخرت . 

MsgBoxWindow = guiCreateWindow(0.3984,0.3841,0.2061,0.1901,"Info",true)
guiSetAlpha(MsgBoxWindow,0.8)
MsgBoxText = guiCreateLabel(0.1991,0.2808,0.5498,0.4726,"",true,MsgBoxWindow)
guiSetVisible(MsgBoxWindow, false)

function guiShowMessageBox(co)
guiSetVisible(MsgBoxWindow, true)
guiSetText(MsgBoxText,co)
showCursor(false)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.70000000000000) end, 300, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.60000000000000) end, 700, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.50000000000000) end, 1000, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.40000000000000) end, 1300, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.30000000000000) end, 1500, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.20000000000000) end, 1800, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.10000000000000) end, 2000, 1)
setTimer(function() guiSetAlpha(MsgBoxWindow,0.00000000000000) end, 2300, 1)
setTimer(function() guiSetVisible(MsgBoxWindow, false) end, 2300, 1)
end
-- حط ذا ب الميتا
<export function="guiShowMessageBox" type="client"/>
-- عشان تفتح اللوحة
exports.msgbox:guiShowMessageBox ("text")

Client-only

Edited by xNawaf
Link to comment
  • Scripting Moderators
4 minutes ago, Deativated said:

ي حبيبي انا مجررب

الكود يلي مرسله لك تحطه ب مود اسمه msgbox ع حسب م كتبت انت فوق
وتحط حق الميتا
وعشان تفتحه من مود ثاني
لازم يكون كلينت
 

exports.msgbox:guiShowMessageBox ("text")

+ انا مجربه بنفسي شغال %100

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