3ssol Posted June 14, 2013 Posted June 14, 2013 لسلام عليكم شباب سويت ماركر حلوو وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه وتقوله هذا الاعب لمس الماركر وش الفنكشنات المطلوبه
AboShanab Posted June 14, 2013 Posted June 14, 2013 onMarkerHit onPlayerMarkerHit getPlayerSerial outputChatBox
SaydOo Posted June 14, 2013 Posted June 14, 2013 هاذي استخدمها عشان اذا اللاعب لمس الماركر -- onPlayerMarkerHit تاخذ السريال -- getPlayerSerial وترسل له رسالة -- outputChatBox او تعلمها من ال wiki https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit
K1NG Posted June 14, 2013 Posted June 14, 2013 ^ -_-" ---- 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 إستببدل
iMr.Dawix~# Posted June 14, 2013 Posted June 14, 2013 اعتقد صاحب الموضوع طلب الفنكشنات مو الكود لسلام عليكمشباب سويت ماركر حلوو وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه وتقوله هذا الاعب لمس الماركر وش الفنكشنات المطلوبه
PaiN^ Posted June 14, 2013 Posted June 14, 2013 ما فيه شي معقد الوظيفة اللي فوق من صنع تيتي عمر, تلقاها بالويكي يعني الكود اللي تبغاه بس تحت, الفوق موجود من اول
iPrestege Posted June 14, 2013 Posted June 14, 2013 -- # 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 ) شرط سريال و انتهينآ اذا الماركر لـ شخص واحد ذذ..
3ssol Posted June 14, 2013 Author Posted June 14, 2013 برستيج طريقتك حلوه وسهله انا اابي اذا واحد لمس الماركر تجيه رساله بـ الشات مثلا تقوله ولكم وانا تجيني رساله تقولي هذا الاعب لمس الماركر
iPrestege Posted June 14, 2013 Posted June 14, 2013 اذا من السريآل مآلك الا كود كنق تقدر تسوية ب الاسم اذا تبي سهله
PaiN^ Posted June 14, 2013 Posted June 14, 2013 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 ) كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين
3NAD Posted June 14, 2013 Posted June 14, 2013 ^ -_-"---- 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 ) كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين افرضوا يا حبايبي ان صاحب السيريال مهوب موجود في السيرفر .. تتوقعون مآراح يجي اخطاء ؟
iPrestege Posted June 14, 2013 Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) اذا ماكان فية صاحب السريال تطلع لـ اللي لمس الماركر ..
3NAD Posted June 14, 2013 Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) موب موجود element إفرض الـ
iPrestege Posted June 14, 2013 Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) موب موجود element إفرض الـ الالمنت هو اللي لمس الماركر ..
3NAD Posted June 14, 2013 Posted June 14, 2013 الالمنت هو اللي لمس الماركر .. يعني راح تجيه رسالتين outputChatBox( "Welcome", element, 255, 255, 255, true ) outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true )
iPrestege Posted June 14, 2013 Posted June 14, 2013 الالمنت هو اللي لمس الماركر .. يعني راح تجيه رسالتين 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 )
3NAD Posted June 14, 2013 Posted June 14, 2013 هذآ اللي كنت ابي اوصل له لـ تفآدي الأخطاء .. أنتبهوا يآ أخوان .. اهم شيء الشروط
Quited Posted June 14, 2013 Posted June 14, 2013 (edited) بس هو يقول رسالة للشأت العام تقوله "ولكم" ورسالة صاحب السيريال برضه بالشأت العام ويشوفها الكل ؟ وش الفايدة ؟ من شرط if getPlayerSerial يعني رسالتين بالشات كل مايدخل الماركر ؟ Edited June 14, 2013 by Guest
Quited Posted June 14, 2013 Posted June 14, 2013 طيب حتى ولو لصاحب السيريال راح تظهر للكل لانها outputchatbox
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now