Jump to content

طلب ........


Recommended Posts

ابغى شرط اللي هو

كل الاسلحة تقدر تدخل الماركر

بس اذا كان معه سلاح رقم 5

يتم نقلة

ابغى الشرط بس هذا اللي يهمني مثل كذا

  
if getElementHealth(thePlayer) <= 10 then 
اذا كان دم اللاعب اقل من عشرة يمكنه دخول الماركر 
  

يعني ابغى التحقق يساوي ولا يساوي

اذا كان السلاح لا يساوي 5 يدخل

Link to comment

الي فهمته منك انك تبي الاعب يدخل الماركر بكل الاسلحه الا السلاح رقم 5

هذا الكود تفضل

local Marker = createMarker ( ... ) 
  
addEventHandler ( "onClientMarkerHit", resourceRoot, function (    ) 
    if ( getElementType ( localPlayer ) == "player" ) and ( source == Marker ) then 
    if ( getPedWeapon ( localPlayer ) ~= 5 ) then return outputChatBox ( "لا يمكنك الانتقال , لانك تملك السلاح رقم 5", true ) end 
    setElementPosition ( localPlayer, x, y, z ) -- x,y,z هنا حط الاحداثيات بدل 
    end 
end ) 
Edited by Guest
Link to comment
ابغى شرط اللي هو

كل الاسلحة تقدر تدخل الماركر

بس اذا كان معه سلاح رقم 5

يتم نقلة

اذا كان السلاح لا يساوي 5 يدخل

الي فهمته منك انك تبي اذا الاعب معه سلاح رقم 5 ينقله وباقي الاسلحه ماينقله ويقدر يدخل عادي

هذا الكود تفضل

local Marker = createMarker ( ... ) 
  
addEventHandler ( "onClientMarkerHit", resourceRoot, function (    ) 
    if ( getElementType ( localPlayer ) == "player" ) and ( source == Marker ) then 
    if ( getPedWeapon ( localPlayer ) == 5 ) then return outputChatBox ( "لا يمكنك الانتقال , لا تملك السلاح رقم 5", true ) end 
    setElementPosition ( localPlayer, x, y, z ) -- x,y,z هنا حط الاحداثيات بدل 
    end 
end ) 

! والشرط الي يجيب دم الاعب حقك صحيح

معرفه thePlayer بس تأكد ان

واذا تبغي العكس خل الشرط كذا

if ( getPedWeapon ( localPlayer ) ~= 5 ) then return outputChatBox ( "يمكنك الدخول لانك , لا تملك السلاح رقم 5", true ) end 

في هذي الحاله بيصير العكس تدخل بكل الاسلحه الا سلاح رقم 5

اتوقع فهمت قصدي

صراحه انلحس مخي :scratch:

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