charaf12 Posted March 13, 2014 Share Posted March 13, 2014 سسلام عليكم ورحمه الله وبراكته # شباب كيفكم سويت مود تملس ماركر توخد سياره وكود سليم .. وانا ابي لما يوخد سياره يجي له رساله لكن مو بل شات ! outputChatBox -- ابي يجي بنص شاشه مثل Gta:Sa لما تختم اي مهمه .. يقول Win 500$ انا ابي هون يطلع Car Spwan local marker1 = createMarker (x,y,z,'cylinder',2,255,0,255,177 ) addEventHandler('onMarkerHit',marker1,function (plr) if getElementType(plr) == 'player' and not isPedInVehicle(plr) then if isElement(vehicle[plr]) then destroyElement(vehicle[plr]) vehicle[plr] = nil end local x,y,z = getElementPosition(plr) vehicle[plr] = createVehicle(id,x,y,z) warpPedIntoVehicle(plr,vehicle[plr]) outputChatBox('Welcome to your car',plr,255,0,255,true) end end ) addEventHandler('onVehicleExplode',resourceRoot,function() setTimer(destroyElement,2000,1,source) end ) addEventHandler('onPlayerQuit',root,function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end ) Link to comment
فاّرس Posted March 13, 2014 Share Posted March 13, 2014 onClientRender triggerClientEvent guiGetScreenSize dxDrawText setTimer removeEventHandler Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 اخي كلهم فاهمهم الا تريقركلنت مدري لي نص ما فاهمه ويفهم تريقر سيرفر اتمنى تفهمني ياه هنا ومناسب لمثال تكفىى .. Link to comment
#DRAGON!FIRE Posted March 13, 2014 Share Posted March 13, 2014 addCommandHandler( "TextScreen", function( player,_, msg ) --- اضافة امر جديد بالكونسل if ( msg and type( msg ) == "string" ) then --- نتحقق انه كتب المسج وانه المسج تساوي سترنق triggerClientEvent ( player, "ShowMsg", player, tostring( msg ) ) --- نرسل تريقر لكلنت مع جلب المسج اللي كتبها end end ) addEvent( "ShowMsg", true ) --- استقبال التريقر بـ اسمه addEventHandler( "ShowMsg", root, function( msg ) --- استقبال التريقر بـ اسمه ونعرف الرسالة اللي كتبها وارسلنها بالتريقر بالفنكشن هنا if not ( isElement( Label ) ) then ---- نتحقق من عدم وجود اللبل Label = guiCreateLabel ( 200, 200, 200, 200, msg, true ) --- نسوي اللبل بـ الرسالة اللي كتبها اللاعب else ---- لو كان اللبل موجود destroyElement( Label ) --- نشيل اللبل end end ) Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 and , type ما فهمتهم Link to comment
فاّرس Posted March 13, 2014 Share Posted March 13, 2014 and تكون الزامي, مثلا اذا كان معك فلوس وكنت داخل السياره..., if getPlayerMoney() > 0 and isPedInVehicle(localPlayer) then هنا لازم يكون معك وانت داخل السياره , يعني مثلا لو معك 1000 وانت مو داخل السياره الوظيفه ما بتتحقق, تستخدم اذا تبي تسوي شرط يتحقق او لا , مثلا اذا كان معك وفلوس او كنت داخل السياره , or بعكس if getPlayerMoney() > 0 or isPedInVehicle(localPlayer) then هنا لو كانت معك فلوس يسوي الوظيفه , اما لو ما كان معك فلوس وكنت داخل السياره يسوي الوظيفه, type بالنسبه لـ تجيب لك نوع الشيء, str = "Test" outputChatBox(type(str)) -- string t = {} outputChatBox(type(t)) -- table Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 وربي شرح مفهم بس مو كانه or مثل and Link to comment
charaf12 Posted March 13, 2014 Author Share Posted March 13, 2014 هذا لانه مثال متشابهين ممكن تغير مثال And 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