Jump to content

رساله


Recommended Posts

لسلام عليكم

شباب

سويت ماركر حلوو

وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه

وتقوله هذا الاعب لمس الماركر

وش الفنكشنات المطلوبه

Link to comment

^ -_-"

----

function getPlayerFromSerial(serial) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onMarkerHit", theMarker, 
    function ( element ) 
        if ( getElementType ( element ) == "player" ) then 
            outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) 
        end 
    end, false 
) 

بسريال اللاعب الي تبي تظهر له الرسالة ذذ : سطر 15 The Serial بالرسالة الي تبيها وإستبدل The Msg إستببدل

Link to comment

اعتقد صاحب الموضوع طلب الفنكشنات مو الكود

لسلام عليكم

شباب

سويت ماركر حلوو

وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه

وتقوله هذا الاعب لمس الماركر

وش الفنكشنات المطلوبه

Link to comment

-- # Server Side ~ 
  
local aMarker = createMarker ( x,y,z,"cylinder",2, 255, 255, 0, 170 ) 
local aText = 'Hello World' 
local aSerial = 'Serial' 
  
addEventHandler('onMarkerHit',aMarker, 
    function ( aHitElement ) 
        if getElementType ( aHitElement ) == ( 'player' ) then 
            if getPlayerSerial ( aHitElement ) == aSerial then 
                outputChatBox ( aText,aHitElement,0,255,0 ) 
            end 
        end 
    end 
) 

شرط سريال و انتهينآ

اذا الماركر لـ شخص واحد ذذ..

Link to comment

برستيج طريقتك حلوه وسهله

انا اابي اذا واحد لمس الماركر

تجيه رساله بـ الشات مثلا تقوله ولكم

وانا تجيني رساله تقولي هذا الاعب لمس الماركر

Link to comment
function getPlayerFromSerial(serial) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onMarkerHit", theMarker, 
    function ( element ) 
        if ( getElementType ( element ) == "player" ) then 
            outputChatBox( "Welcome", element, 255, 255, 255, true ) 
            outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) 
        end 
    end, false 
) 

كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين

Link to comment
^ -_-"

----

function getPlayerFromSerial(serial) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onMarkerHit", theMarker, 
    function ( element ) 
        if ( getElementType ( element ) == "player" ) then 
            outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) 
        end 
    end, false 
) 

بسريال اللاعب الي تبي تظهر له الرسالة ذذ : سطر 15 The Serial بالرسالة الي تبيها وإستبدل The Msg إستببدل

function getPlayerFromSerial(serial) 
    if serial and type(serial) == "string" then 
        for i, v in ipairs(getElementsByType("player")) do 
            if getPlayerSerial(v) == serial then 
                return v 
            end 
        end 
    end 
    return false 
end 
  
addEventHandler ( "onMarkerHit", theMarker, 
    function ( element ) 
        if ( getElementType ( element ) == "player" ) then 
            outputChatBox( "Welcome", element, 255, 255, 255, true ) 
            outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) 
        end 
    end, false 
) 

كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين

افرضوا يا حبايبي ان صاحب السيريال مهوب موجود في السيرفر ..

تتوقعون مآراح يجي اخطاء ؟

Link to comment
الالمنت هو اللي لمس الماركر .. :wink:

يعني راح تجيه رسالتين :wink:

outputChatBox( "Welcome", element, 255, 255, 255, true ) 
outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) 

Link to comment
الالمنت هو اللي لمس الماركر .. :wink:

يعني راح تجيه رسالتين :wink:

outputChatBox( "Welcome", element, 255, 255, 255, true ) 
outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) 

اكيد اذا ماسويت الشرط ( =

addEventHandler ( "onMarkerHit", theMarker, 
    function ( element ) 
        if ( getElementType ( element ) == "player" ) then 
            outputChatBox( "Welcome", element, 255, 255, 255, true ) 
                if getPlayerFromSerial ( "The Serial" ) then 
                    outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ), 255, 255, 255, true ) 
            end 
        end 
    end, false 
) 

Link to comment

بس هو يقول رسالة للشأت العام تقوله "ولكم"

ورسالة صاحب السيريال برضه بالشأت العام ويشوفها الكل ؟

وش الفايدة ؟

من شرط

if getPlayerSerial

يعني رسالتين بالشات كل مايدخل الماركر ؟

Edited by Guest
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...