Jump to content

مساعدة في صناعة سكربت شوت


Recommended Posts

سلام عليكم ورحمه الله

في سكربت معين ادور عليه لي سنة مش لاقيه

هو مود نفس يلي سواه Bozllit

بس انا ابي فيه مواصفات معينة* مثلاً:

مايكونش فيه خاصية اختيار اللوان #يكتب_ابيض_على_طول-1

يكتب في نص الشاشة-2

يكتب بخط حلو مثل في هذه الصورة-3

H1qC8w.jpg

ملاحظة: بدون كلمة ادمن :)

يكون مجرد كلمة تنكتب في اف8-4

مثلاً msgall سلام عليكم ورحمه الله

لما حد يكتب في الشوت يطلع اسمه في الشات-5

نفس مايسوي بيتر في وزارة الهجولة*بالزبط,,

يلي عنده سكربت يشفره براحته بس يطرحه ليا وشكراً لكـم

في امان الله

Link to comment
سهلة جدا :
addCommandHandler 
isObjectInACLGroup 
outputChatBox 
triggerClientEvent 
addEventHandler 
dxDrawText 
setTimer 
removeEventHandler 

Text functions في طريقة ثانية بـ استخدام

طيب الكود يلي انت كاتبه احطه في ملف الكلنت ؟ لاني مزلت مش عارف شي :o

Link to comment
سهلة جدا :
addCommandHandler 
isObjectInACLGroup 
outputChatBox 
triggerClientEvent 
addEventHandler 
dxDrawText 
setTimer 
removeEventHandler 

Text functions في طريقة ثانية بـ استخدام

+

dxCreateFont 

يجيب الخط الي هو يبيه

انا سويت يلي قلتولي عليه قولولي فيه خطأ او لا؟ وهل احطه في ملف السيرفر او الكلنت وشكراً

addCommandHandler ("msgall"),function() 
outputChatBox("هذا اللاعب كتب على شاشة الجميع #FF00FF "..getPlayerName(player).."#FF0000", getRootElement(), 255, 0, 0, true) 
end 
  
local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) 
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
        local message = table.concat ( { ... }," " ) 
        textDisplay = textCreateDisplay ( ) 
        textItem = textCreateTextItem ( message, 0.5, 0.6, 2, 255, 255, 255, 255, 2.5, "center", "center" ) 
        end 
        setTimer ( 
            function ( ) 
                textDestroyTextItem ( textItem ) 
                textDestroyDisplay ( textDisplay ) 
            end 
            ,5000, 1 
        ) 
    end 
end 
addCommandHandler ( "msgall", shout ) 
  

Link to comment

بسطر ثنين منت معرف player

وانت مخبص شوي مسوي كومندين واقواس وايندات زايده

صححت لك الكود وقارنه بالكود حقك عشان تعرف الاخطاء وكل شي

addCommandHandler ("msgall",function(player,cmd,...) 
local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
    outputChatBox("هذا اللاعب كتب على شاشة الجميع #FF00FF "..getPlayerName(player).."#FF0000", getRootElement(), 255, 0, 0, true) 
    local message = table.concat ( { ... }," " ) 
    textDisplay = textCreateDisplay ( ) 
    textItem = textCreateTextItem ( message, 0.5, 0.6, 2, 255, 255, 255, 255, 2.5, "center", "center" ) 
    setTimer ( 
    function ( ) 
    textDestroyTextItem ( textItem ) 
    textDestroyDisplay ( textDisplay ) 
    end 
    ,5000, 1 
    ) 
    end 
end 
) 

Link to comment
بسطر ثنين منت معرف player

وانت مخبص شوي مسوي كومندين واقواس وايندات زايده

صححت لك الكود وقارنه بالكود حقك عشان تعرف الاخطاء وكل شي

addCommandHandler ("msgall",function(player,cmd,...) 
local accName = getAccountName ( getPlayerAccount ( player ) ) 
    if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Console" ) ) then 
    outputChatBox("هذا اللاعب كتب على شاشة الجميع #FF00FF "..getPlayerName(player).."#FF0000", getRootElement(), 255, 0, 0, true) 
    local message = table.concat ( { ... }," " ) 
    textDisplay = textCreateDisplay ( ) 
    textItem = textCreateTextItem ( message, 0.5, 0.6, 2, 255, 255, 255, 255, 2.5, "center", "center" ) 
    setTimer ( 
    function ( ) 
    textDestroyTextItem ( textItem ) 
    textDestroyDisplay ( textDisplay ) 
    end 
    ,5000, 1 
    ) 
    end 
end 
) 

شكراً للتعديل ضفت الكود الى ملف سيرفر وعرفته في الميتا وشغلت المود في السيرفر لكـن ما يبي يكتب في الشات :(

Link to comment

انت ما استخدمت الفنكشن ذا عشان تخلي لاعب يشوف الكلام

textDisplayAddObserver 

أضافة إلى ان طريقة برمجتك خاطئة

خارج الكومند display + textItem يفترض انك تسوي

و تستخدم ذا داخل الكومند و تحط الكلام

textItemSetText 

Link to comment
https://community.multitheftauto.com/index.php?p=resources&s=details&id=1201

وضيف في السطر الـ رابع ذا

outputChatBox(''..getPlayerName(player)..' ارسل شوت ',root,255,255,0,true) 

وعشان تخلي الـ تكست ابيض بدل السطر ذا

local textItem = textCreateTextItem( ""..message, 0.5, 0.5, 2, 255, 255, 255, 255, 3, "center", "center" ) 

شكراً بالنسبة لأضافة الخط؟ انا نزلت خط لكن ياريت تقولي وشكراً

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