3ssol Posted June 14, 2013 Share Posted June 14, 2013 لسلام عليكم شباب سويت ماركر حلوو وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه وتقوله هذا الاعب لمس الماركر وش الفنكشنات المطلوبه Link to comment
AboShanab Posted June 14, 2013 Share Posted June 14, 2013 onMarkerHit onPlayerMarkerHit getPlayerSerial outputChatBox Link to comment
3ssol Posted June 14, 2013 Author Share Posted June 14, 2013 وش فايدت onPlayerMarkerHit Link to comment
SaydOo Posted June 14, 2013 Share Posted June 14, 2013 هاذي استخدمها عشان اذا اللاعب لمس الماركر -- onPlayerMarkerHit تاخذ السريال -- getPlayerSerial وترسل له رسالة -- outputChatBox او تعلمها من ال wiki https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit Link to comment
K1NG Posted June 14, 2013 Share 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 إستببدل Link to comment
iMr.Dawix~# Posted June 14, 2013 Share Posted June 14, 2013 اعتقد صاحب الموضوع طلب الفنكشنات مو الكود لسلام عليكمشباب سويت ماركر حلوو وابي الي يلمس الماركر تجي رساله لـ صاحب سيريال انا احطه وتقوله هذا الاعب لمس الماركر وش الفنكشنات المطلوبه Link to comment
3ssol Posted June 14, 2013 Author Share Posted June 14, 2013 اووف ماتوقعت الكود بـ التعقيد هذا Link to comment
PaiN^ Posted June 14, 2013 Share Posted June 14, 2013 ما فيه شي معقد الوظيفة اللي فوق من صنع تيتي عمر, تلقاها بالويكي يعني الكود اللي تبغاه بس تحت, الفوق موجود من اول Link to comment
iPrestege Posted June 14, 2013 Share 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 ) شرط سريال و انتهينآ اذا الماركر لـ شخص واحد ذذ.. Link to comment
PaiN^ Posted June 14, 2013 Share Posted June 14, 2013 هو يبغى الرسالة توصل لشخص معين, مو اللي لمس الماركر Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 دامها كذا يستخدم اللي فوق الثاني .. حق k!ng Link to comment
3ssol Posted June 14, 2013 Author Share Posted June 14, 2013 برستيج طريقتك حلوه وسهله انا اابي اذا واحد لمس الماركر تجيه رساله بـ الشات مثلا تقوله ولكم وانا تجيني رساله تقولي هذا الاعب لمس الماركر Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 اذا من السريآل مآلك الا كود كنق تقدر تسوية ب الاسم اذا تبي سهله Link to comment
PaiN^ Posted June 14, 2013 Share 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 ) كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين Link to comment
3NAD Posted June 14, 2013 Share 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 ) كذا مداك تطلع رسالة للي لمس الماركر ولصاحب سيريال معين افرضوا يا حبايبي ان صاحب السيريال مهوب موجود في السيرفر .. تتوقعون مآراح يجي اخطاء ؟ Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) اذا ماكان فية صاحب السريال تطلع لـ اللي لمس الماركر .. Link to comment
3NAD Posted June 14, 2013 Share Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) موب موجود element إفرض الـ Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) موب موجود element إفرض الـ الالمنت هو اللي لمس الماركر .. Link to comment
3NAD Posted June 14, 2013 Share Posted June 14, 2013 الالمنت هو اللي لمس الماركر .. يعني راح تجيه رسالتين outputChatBox( "Welcome", element, 255, 255, 255, true ) outputChatBox ( "The Msg", getPlayerFromSerial ( "The Serial" ) or element, 255, 255, 255, true ) Link to comment
iPrestege Posted June 14, 2013 Share 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 ) Link to comment
3NAD Posted June 14, 2013 Share Posted June 14, 2013 هذآ اللي كنت ابي اوصل له لـ تفآدي الأخطاء .. أنتبهوا يآ أخوان .. اهم شيء الشروط Link to comment
iPrestege Posted June 14, 2013 Share Posted June 14, 2013 [ = اللي سويتة مجرد اقتراح بدآل الشرط ذذ Link to comment
Quited Posted June 14, 2013 Share Posted June 14, 2013 (edited) بس هو يقول رسالة للشأت العام تقوله "ولكم" ورسالة صاحب السيريال برضه بالشأت العام ويشوفها الكل ؟ وش الفايدة ؟ من شرط if getPlayerSerial يعني رسالتين بالشات كل مايدخل الماركر ؟ Edited June 14, 2013 by Guest Link to comment
PaiN^ Posted June 14, 2013 Share Posted June 14, 2013 هو يبي رسالة لصاحب السيريال + اللي لمس الماركر Link to comment
Quited Posted June 14, 2013 Share Posted June 14, 2013 طيب حتى ولو لصاحب السيريال راح تظهر للكل لانها outputchatbox Link to comment
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