Jump to content

تصحيح كود بسيط


[DONE]*

Recommended Posts

السلام عليكم و رحمة الله و بركاته :D

__________________________________________________________________________________________________________

كيف الحال شباب, انشاء الله بخير :wink:

__________________________________________________________________________________________________________

كنت ابيكم تصححون لي هذه الكود :roll:

__________________________________________________________________________________________________________

Vehcile[client] = createVehicle(id,2048.23218, -2593.26953, 13.54688,0,0,90) 
function addHelmetOnEnter () 
 if Vehcile[source] then 
    destroyElement(Vehcile[source]) 
    end 
end 
addEventHandler ( "onVehicleEnter", root, addHelmetOnEnter ) 
  
function removeHelmetOnExit () 
 if Vehcile[source] then 
    destroyElement(Vehcile[source]) 
    end 
end 
addEventHandler ( "onVehicleExit", root, removeHelmetOnExit ) 

--------------------------------------------------------------------------------------------------------------------------------------------------------

وشكرآ لكم :mrgreen:

Link to comment
..يبدو ان الكود ليس من صنعك

كيف يعني ؟ :?

____________________________________________________________________________________________________________

الكود من صنعي و الكود عباره عن لما واحد ينزل من المركبه تختفي :idea:

____________________________________________________________________________________________________________

Link to comment

ببساطة اكتشفت انه ليس من صنعك عن طريق ملاحظة ان كودك ليس كامل, وكأنه جزء من كل.. فمثلاً

؟Vehcile وين جدول

؟id وكيف تم تعريف

واسماء الوظائف تدل على ان غرض الكود هو انه كلما يدخل لاعب مركبة محددة يلبس خوذة لأن

Helmet = خوذة

Link to comment
ببساطة اكتشفت انه ليس من صنعك عن طريق ملاحظة ان كودك ليس كامل, وكأنه جزء من كل.. فمثلاً

؟Vehcile وين جدول

؟id وكيف تم تعريف

واسماء الوظائف تدل على ان غرض الكود هو انه كلما يدخل لاعب مركبة محددة يلبس خوذة لأن

Helmet = خوذة

الحين انتبهت :idea:

Link to comment

جـرب , ..

marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0) 
  
addEventHandler("onMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and not isPedInVehicle(player) then 
      vehicle = createVehicle(id, getElementPosition(player)) 
          warpPedIntoVehicle(player,vehicle) 
     end 
end 
) 
  
addEventHandler ("onVehicleStartExit", root, 
function () 
    destroyElement (vehicle) 
 end 
) 
Edited by Guest
Link to comment
جـرب , ..

marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0) 
  
addEventHandler("onMarkerHit", marker, 
function(player) 
     if getElementType(player) == "player" and not isPedInVehicle(player) then 
      vehicle = createVehicle(id, getElementPosition(player)) 
          warpPedIntoVehicle(player,vehicle) 
     end 
end 
) 
  
addEventHandler ("onVehicleStartExit", root, 
function () 
    destroyElement ( vehicle) 
 end 
) 

ما ظبت بس قدرت اسويها + شكرا لك :wink:

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...