Jump to content

#- طلب فنكش -#


Recommended Posts


-- 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
Link to comment
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
Link to comment

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

-- 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
Link to comment
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

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

Link to comment

بقلي السطر الثاني <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
  

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

Link to comment
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
Link to comment
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

مشكووووور

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

Link to comment
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) 

قصدك كدا ؟

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

Link to comment
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) 

قصدك كدا ؟

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

يب مشكوور

Link to comment

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
Link to comment

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) 

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

Link to comment
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) 

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

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

 

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