Jump to content

#- طلب فنكش -#


Recommended Posts

Posted

السلام عليكم 

ادري طلباتي كثيرة بس استحملوني

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

ممكن مساعدة ؟

 

Posted (edited)
48 minutes ago, #Himoo said:

تبيه يسحب من اللاعب فلوس بالاول ؟

ولا ياخذ علطول


"onMarkerHit"
giveWeapon

 

يخذ على طول اول ما يدخله

 

اعرف  اطول  الفنكش من الويكي بس ما  اعرف اعدل عليه اخلي للماركر 

Edited by #[K]iLLeR<3

 

Posted (edited)

-- marker اسم ماركرك مثلا
addEventHandleraddEventHandler("onMarkerHit",marker,
  function( hitEelement )
if isPedInVehicle(hitEelement) then return end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
)

ايديهات الاسلحة : اضغط

Edited by #Himoo
Posted
31 minutes ago, #Himoo said:

-- marker اسم ماركرك مثلا
addEventHandleraddEventHandler("onMarkerHit",marker,
  function( hitEelement )
if isPedInVehicle(hitEelement) then return end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
)

ايديهات الاسلحة : اضغط

addEventHandleraddEventHandler?

  • Like 1

 

قد تكونآمنيآتنآ حزينه !وآحلآمُنآ ملت طآبور آلإنتِظآر لكنهآ ،تتشبث بآلأمل فنفوسُنآ خُلقت لتقول غداً آجمل B-18.png 

Posted (edited)

ض المشكلة الجوال ... اي كلمة انقليزي يكررها ض

-- marker اسم ماركرك مثلا
addEventHandler("onMarkerHit",marker,
  function( hitEelement )
if isPedInVehicle(hitEelement) then return end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
)

@#Himoo

Edited by !#NssoR_)
يرجي تحسين اسلوبك قليلأ
  • Haha 1
Posted
14 hours ago, #Himoo said:

ض المشكلة الجوال ... اي كلمة انقليزي يكررها ض


-- marker اسم ماركرك مثلا
addEventHandler("onMarkerHit",marker,
  function( hitEelement )
if isPedInVehicle(hitEelement) then return end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
)

@#Himoo

بقلي في غلط بالسطر الثاني 

 

Posted

بقلي السطر الثاني <name> 

1 hour ago, #Himoo said:

اي سطر بالظبط ؟

مو شايف اخطاء انا

 

local myMarker = createMarker(2484.9118652344,-1664.3916015625,13.34375, 'cylinder', 50, 255, 0, 0, 150)

function MarkerHit( hitElement, matchingDimension )
    local elementType = getElementType( hitElement )
end

addEventHandler("onMarkerHit",marker,
  function( hitEelement )
if isPedInVehicle(hitEelement) then return end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
  

بحطه كذا ما بشتغل

 

Posted
myMarker = createMarker(2484.9118652344,-1664.3916015625,13.34375, 'cylinder', 50, 255, 0, 0, 150)
----- 
addEventHandler ( "onMarkerHit",myMarker,function ( hitEelement )
if getElementType(hitEelement) == "player" then -- سويت تحقق ان اللي لمس الماركر هو اللاعب
if isPedInVehicle(hitEelement) then return outputChatBox 'Error' end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
end) 
  • #Server-Said
  • Like 1

TehLMGN.png?1

 

سبحان الله وبحمده سبحان الله العظيم

Posted
9 minutes ago, #\_oskar_/# said:

myMarker = createMarker(2484.9118652344,-1664.3916015625,13.34375, 'cylinder', 50, 255, 0, 0, 150)
----- 
addEventHandler ( "onMarkerHit",myMarker,function ( hitEelement )
if getElementType(hitEelement) == "player" then -- سويت تحقق ان اللي لمس الماركر هو اللاعب
if isPedInVehicle(hitEelement) then return outputChatBox 'Error' end
local id = 30 -- ايدي السلاح
local ammo = 200 -- عدد الذخيرة
giveWeapon(hitEelement, id,ammo,true)
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..ammo.." ammo",hitEelement,0,255,0,true)
playSoundFrontEnd(hitEelement, 20)
end
end) 
  • #Server-Said

مشكووووور

بس تقدر تخلي  اذا غير السلاح يرجع + اذا دخل بسيارة يخذ نفس الشي بعد .. اذا صعبة انسى خلاص

 

Posted
12 hours ago, #\_oskar_/# said:

مافهمتك ؟

اذا دخل بالسيارة يخذ السلاح + يضل طول ما هو واقف داخل الماركر يخذ السلاح 

 

Posted
local _wep ={} 
addEventHandler ( "onMarkerHit",myMarker,function (player)
if getElementType(player) == "player" then
if _wep[player] and isTimer(_wep[player]) then killTimer(_wep[player]) end  
_wep[player] = setTimer ( function(player) 
local Ammo = getPedTotalAmmo (player)
if tonumber ( Ammo ) < 1000 then  
if isElement(player) then
id = 30 --Weapon ID
giveWeapon(player,id,100,true) 
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..Ammo.." ammo",player,0,255,0,true)
end 
elseif isElement(player) then  
killTimer(_wep[player]) _wep[player] = nil outputChatBox ('تم تعبئة الذخيرة',player,255,0,0,true) 
end 
end,1000,0,player)
end 
end) 

قصدك كدا ؟

كل ثانيه يعطيه سلاح 

TehLMGN.png?1

 

سبحان الله وبحمده سبحان الله العظيم

Posted
5 hours ago, #\_oskar_/# said:

local _wep ={} 
addEventHandler ( "onMarkerHit",myMarker,function (player)
if getElementType(player) == "player" then
if _wep[player] and isTimer(_wep[player]) then killTimer(_wep[player]) end  
_wep[player] = setTimer ( function(player) 
local Ammo = getPedTotalAmmo (player)
if tonumber ( Ammo ) < 1000 then  
if isElement(player) then
id = 30 --Weapon ID
giveWeapon(player,id,100,true) 
outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..Ammo.." ammo",player,0,255,0,true)
end 
elseif isElement(player) then  
killTimer(_wep[player]) _wep[player] = nil outputChatBox ('تم تعبئة الذخيرة',player,255,0,0,true) 
end 
end,1000,0,player)
end 
end) 

قصدك كدا ؟

كل ثانيه يعطيه سلاح 

يب مشكوور

 

Posted
13 minutes ago, #\_oskar_/# said:

العفو

اوسكر ممكن بس تشيل الكلام الي بطلع بالشات

شلته خرب المود ض2

خلاص تمت الافادة

 

Posted
6 hours ago, #\_oskar_/# said:

_wep

dashوش ال

فايدتها هنا ؟ _ ليش تحطها 

صراحة انا ما اعرف السؤال هو استفسار وليس تخطيئ لا تفهمني خطأ اخي

Posted
1 hour ago, Debo15 said:

dashوش ال

فايدتها هنا ؟ _ ليش تحطها 

صراحة انا ما اعرف السؤال هو استفسار وليس تخطيئ لا تفهمني خطأ اخي

مجرد تسمية لأسم الجدول لاغير .

  • Thanks 1

Experienced MTA developer for 4 years. | MTA خبرة 4 سنين في برمجة

ليس عليك اسعاد الجميع ,
ولكن عليك بإن لا تؤذي أحداً 

=========
You do not have to make everyone happy,
But you should not hurt anyone

 

Want to contact with me?

 

Discord: JustCarry#2616 (Always there)
Skype: Live:JustCarry10 (Not always)

Posted (edited)

local _wep ={} 
addEventHandler ( "onMarkerHit",myMarker,function (player)
if getElementType(player) == "player" then
if _wep[player] and isTimer(_wep[player]) then killTimer(_wep[player]) end  
_wep[player] = setTimer ( function(player) 
local Ammo = getPedTotalAmmo (player)
if tonumber ( Ammo ) < 1000 then  
if isElement(player) then
id = 30 --Weapon ID
giveWeapon(player,id,100,true) 
--outputChatBox("You got "..getWeaponNameFromID(id).." weapon with "..Ammo.." ammo",player,0,255,0,true)
end 
elseif isElement(player) then  
killTimer(_wep[player]) _wep[player] = nil --outputChatBox ('تم تعبئة الذخيرة',player,255,0,0,true) 
end 
end,1000,0,player)
end 
end) 

جـرب كذا الكلام مرح يطلع لك :x 

Edited by MR.TOUNSI
  • Thanks 1
  • Haha 1

________________

My new Script Log Admin :

حصريا : لوق او حفظ سجيلات السيرفر : الموضوع

Be optimistic and you will succeed
______________________________________

 

Posted

local _wep ={} 
addEventHandler ( "onMarkerHit",myMarker,function (player)
if getElementType(player) == "player" then
if _wep[player] and isTimer(_wep[player]) then killTimer(_wep[player]) end  
_wep[player] = setTimer ( function(player) 
local Ammo = getPedTotalAmmo (player)
if tonumber ( Ammo ) < 1000 then  
if isElement(player) then
id = 30 --Weapon ID
giveWeapon(player,id,100,true) then
return end
end 
elseif isElement(player) then  
killTimer(_wep[player]) _wep[player] = nil then
return end
end 
end,1000,0,player)
end 
end) 

آسمحلي الكود غلط فاتح من الهاتف ومش مركز :/ 

________________

My new Script Log Admin :

حصريا : لوق او حفظ سجيلات السيرفر : الموضوع

Be optimistic and you will succeed
______________________________________

 

Posted
6 minutes ago, MR.TOUNSI said:

local _wep ={} 
addEventHandler ( "onMarkerHit",myMarker,function (player)
if getElementType(player) == "player" then
if _wep[player] and isTimer(_wep[player]) then killTimer(_wep[player]) end  
_wep[player] = setTimer ( function(player) 
local Ammo = getPedTotalAmmo (player)
if tonumber ( Ammo ) < 1000 then  
if isElement(player) then
id = 30 --Weapon ID
giveWeapon(player,id,100,true) then
return end
end 
elseif isElement(player) then  
killTimer(_wep[player]) _wep[player] = nil then
return end
end 
end,1000,0,player)
end 
end) 

آسمحلي الكود غلط فاتح من الهاتف ومش مركز :/ 

للمعلوميه كودك خاطئ .. والرجال تمت افادته

 

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