MR.President Posted March 9, 2017 Share Posted March 9, 2017 (edited) local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) function fixVehicle() getPlayerMoney ( source ) if getPlayerMoney (source ) <= 500 then fixVehicle (vehicleValue) outputChatBox ( "تم تصليح سيارتك واخذ منك 500 دولار" ) if getPlayerMoney ( source ) >= 500 then outputChatBox ( "السياره لتصليح كافي نقود يوجد معك لا" ) end end end addEventHandler ("onClientMarkerHit",marker) Edited March 9, 2017 by MR.President Link to comment
#BrosS Posted March 9, 2017 Share Posted March 9, 2017 local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) addEventHandler ("onClientMarkerHit",marker function () cost = getPlayerMoney () if cost >= 500 then fixVehicle (vehicleValue) takePlayerMoney (500) outputChatBox ( "تم تصليح سيارتك واخذ منك 500 دولار" ) else outputChatBox ( "السياره لتصليح كافي نقود يوجد معك لا" ) end end) Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 ما ضبط يجبلي انه في مشكله بسطر الثاني ما في قوس Link to comment
#BrosS Posted March 9, 2017 Share Posted March 9, 2017 Just now, MR.President said: ما ضبط يجبلي انه في مشكله بسطر الثاني ما في قوس سوي فاصلة امام marker معي لاق ماقدرت اعدل local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) addEventHandler ("onClientMarkerHit",marker, function () cost = getPlayerMoney () if cost >= 500 then fixVehicle (vehicleValue) takePlayerMoney (500) outputChatBox ( "تم تصليح سيارتك واخذ منك 500 دولار" ) else outputChatBox ( "السياره لتصليح كافي نقود يوجد معك لا" ) end end) Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 شكرا لك اخي @#BrosS Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 بس اقرب على الماركر ما يصلح السياره بس ياخذ 500 Link to comment
#BrosS Posted March 9, 2017 Share Posted March 9, 2017 (edited) 4 minutes ago, MR.President said: بس اقرب على الماركر ما يصلح السياره بس ياخذ 500 local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) addEventHandler ("onClientMarkerHit",marker, function () veh = getPedOccupiedVehicle (localPlayer) cost = getPlayerMoney () if cost >= 500 then if veh then fixVehicle (veh) takePlayerMoney (500) outputChatBox ( "تم تصليح سيارتك واخذ منك 500 دولار" ) else outputChatBox ( "السياره لتصليح كافي نقود يوجد معك لا" ) else outputChatBox ( "لست راكبا سيارة" ) end end end) Edited March 9, 2017 by #BrosS Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 يجبليي في خطا بسطر السابع الاف ما الها end Link to comment
#BrosS Posted March 9, 2017 Share Posted March 9, 2017 2 minutes ago, MR.President said: يجبليي في خطا بسطر السابع الاف ما الها end عدلت الكود روح حطه او حط بنفسك end Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 اوك شكرا عكل حال بس الي مش عارفه انت حاطط له end ليش اجت خطأ Link to comment
AHMED MOSTAFA Posted March 9, 2017 Share Posted March 9, 2017 1 hour ago, MR.President said: اوك شكرا عكل حال بس الي مش عارفه انت حاطط له end ليش اجت خطأ حليت المشكلة ام بعد ؟ وش مكتوب بالدي بق ؟ 1 Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 لسا مب عارف مكتوب انه في السطر السابع في if وما في الها end Link to comment
Adham Posted March 9, 2017 Share Posted March 9, 2017 (edited) جرب : addEventHandler ( 'onClientMarkerHit',marker, function ( hitPlayer ) if hitPlayer == localPlayer then local car = getPedOccupiedVehicle ( localPlayer ) if car then local Money = getPlayerMoney ( localPlayer ) if Money > 500 then fixVehicle ( car ) takePlayerMoney ( 500 ) outputChatBox ( "* Done Fix Car : "..Money.." ",0,255,0,true ) else outputChatBox ( "* You Dont have moeny",255,0,0,true ) end end end end ) Edited March 9, 2017 by Deativated Link to comment
AHMED MOSTAFA Posted March 9, 2017 Share Posted March 9, 2017 7 minutes ago, MR.President said: لسا مب عارف مكتوب انه في السطر السابع في if وما في الها end جرب ذا وشوف local marker = createMarker ( 2459.77466,-1661.70081,12.90843 , "cylinder" ,3 , 255 , 255 , 0 , 170) addEventHandler ("onClientMarkerHit",marker, function ( DeveloperAhmed ) if ( DeveloperAhmed == localPlayer ) then local PlayerCar = getPedOccupiedVehicle ( DeveloperAhmed ) local PlayerMoney = getPlayerMoney () if PlayerMoney >= 500 then if PlayerCar then fixVehicle ( PlayerCar ) takePlayerMoney ( 500 ) outputChatBox ( "your car fixed - Cost: 500$" ) else outputChatBox ( "you are not in vehicle" ) end else outputChatBox ( "you have no money - your money < 500 $" ) end end end ) ملاحظة : اللعبة ما تشتغل عندي الاكواد اما اسويها بدون تجربة او اعدل عليها بدون تجربة 1 Link to comment
#BrosS Posted March 9, 2017 Share Posted March 9, 2017 11 minutes ago, Deativated said: جرب : addEventHandler ( 'onClientMarkerHit',marker, function ( hitPlayer ) if hitPlayer == localPlayer then local car = getPedOccupiedVehicle ( localPlayer ) if car then local Money = getPlayerMoney ( localPlayer ) if Money > 500 then fixVehicle ( car ) takePlayerMoney ( localPlayer, 500 ) outputChatBox ( "* Done Fix Car : "..Money.." ",0,255,0,true ) else outputChatBox ( "* You Dont have moeny",255,0,0,true ) end end end end ) takePlayerMoney -- مافيه باراماتر اللاعب بالكلنت 1 Link to comment
#Soking Posted March 9, 2017 Share Posted March 9, 2017 14 minutes ago, #BrosS said: takePlayerMoney -- مافيه باراماتر اللاعب بالكلنت اصلن ماينفع كلينت لازم سيرفر التصليح وهمي هيك Link to comment
Adham Posted March 9, 2017 Share Posted March 9, 2017 (edited) -- Client Side - addEventHandler ( 'onClientMarkerHit',marker, function ( hitPlayer ) if hitPlayer == localPlayer then triggerServerEvent ( "Fix", localPlayer ) end end ) -- Server Side -- addEvent ( "Fix", true ) addEventHandler ( "Fix", root, function ( ) local car = getPedOccupiedVehicle ( source ) if car then local Money = getPlayerMoney ( source ) if Money > 500 then fixVehicle ( car ) takePlayerMoney ( source, 500 ) outputChatBox ( "You fix",source,255,0,0,true ) else outputChatBox ( "* You Dont have moeny",source,255,0,0,true ) end end end ) Edited March 9, 2017 by Deativated Link to comment
MR.President Posted March 9, 2017 Author Share Posted March 9, 2017 صراحه مب فاهم شي من الي تكتبوه ايش يعني باراماتر Link to comment
coNolel Posted March 9, 2017 Share Posted March 9, 2017 يعني الاعدادات اللي تكون داخل الفنكشن dxDrawRectangle(parameters) اذا فيه خطا المرجو التنبيه لعدم نشر الخطأ Link to comment
^iiEcoo'x_) Posted March 10, 2017 Share Posted March 10, 2017 outputChatBox ( " Text " , source , 0 , 255 , 0 , true ) -- " Text " بارمتر الكلام بالشات -- source بارمتر لمين تظهر الرسالة ؟ -- 0 255 0 بارمتر الالوان احمر ، ازرق ، اخضر -- true بارمتر تفعيل كود الالوان بالشات بين كل بارمتر تحط فاصلة ( , ) Link to comment
MR.President Posted March 10, 2017 Author Share Posted March 10, 2017 طيب شكرا لكم كلكم بس في فنكشن ما فهمته triggerServerEvent لو سمحتو ممكن تشرحولي ذه ايش يسوي ؟ Link to comment
^iiEcoo'x_) Posted March 10, 2017 Share Posted March 10, 2017 1 hour ago, MR.President said: طيب شكرا لكم كلكم بس في فنكشن ما فهمته triggerServerEvent لو سمحتو ممكن تشرحولي ذه ايش يسوي ؟ 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