Hussain Posted May 4, 2012 Share Posted May 4, 2012 السسلام عليكم ورحمة الله وبركاته شباب عندي سكربت ابي اسويه هذا هو function onPickupHitFunc ( thePlayer ) -- when a pickup is hit if getPickupType ( source ) == 2 then -- check if it's a weapon pickup local ammo = getPickupAmmo ( source ) -- get the pickup ammo if ammo < 50 then -- if ammo is less than 50 local weapon = getPickupWeapon ( source ) -- store pickup weapon giveWeaponAmmo ( thePlayer, weapon, 50 ) -- give an extra 50 ammo end end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunc ) -- add the function as handler for onPickupHit ولكن ابغى اربط معاه شيء ثاني لأن لو حطيته كذا مابيصير شيء ! ابغى اسوي ماركر بإحداثيات معينة الي يروح عليه يصير عليه هالسسكربت وانا ماعرف اربط بين سكربتين يَ ريت تفرحوني وتساعدوني Link to comment
X-SHADOW Posted May 4, 2012 Share Posted May 4, 2012 function onPickupHitFunc ( thePlayer ) -- this is right if getPickupType ( thePlayer ) == 2 then -- source is wrong you have to put the same in the function ( thePlayer ) local ammo = getPickupAmmo ( thePlayer ) -- source is wrong you have to put the same in the function ( thePlayer ) if ammo < 50 then -- if ammo is less than 50 local weapon = getPickupWeapon ( thePlayer ) -- source is wrong you have to put the same in the function ( thePlayer ) giveWeaponAmmo ( thePlayer, weapon, 50 ) -- give an extra 50 ammo end end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunc ) -- add the function as handler for onPickupHit Link to comment
xTeacherx Posted May 4, 2012 Share Posted May 4, 2012 انت قصدك اذا دخل لاعب ماركر ياخذ سلاح ؟ Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 انت قصدك اذا دخل لاعب ماركر ياخذ سلاح ؟ يب يب ابغى لما يخش الماركر وسلآحه فيه اقل من 50 طلقة يعطيه زيادة 50 هذا حسب القيمة الي محددها السكربت فقط للتوضيح Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 function onPickupHitFunc ( thePlayer ) -- this is right if getPickupType ( thePlayer ) == 2 then -- source is wrong you have to put the same in the function ( thePlayer ) local ammo = getPickupAmmo ( thePlayer ) -- source is wrong you have to put the same in the function ( thePlayer ) if ammo < 50 then -- if ammo is less than 50 local weapon = getPickupWeapon ( thePlayer ) -- source is wrong you have to put the same in the function ( thePlayer ) giveWeaponAmmo ( thePlayer, weapon, 50 ) -- give an extra 50 ammo end end end addEventHandler ( "onPickupHit", getRootElement(), onPickupHitFunc ) -- add the function as handler for onPickupHit انت غيرت شيء ؟؟ Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 تقصد كذا؟ t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) addEventHandler("onPickupHit", root, onPickupHitFunc) end) function onPickupHitFunc ( thePlayer ) -- when a pickup is hit if getPickupType ( source ) == 2 then -- check if it's a weapon pickup local ammo = getPickupAmmo ( source ) -- get the pickup ammo if ammo < 50 then -- if ammo is less than 50 local weapon = getPickupWeapon ( source ) -- store pickup weapon giveWeaponAmmo ( thePlayer, weapon, 50 ) -- give an extra 50 ammo end end end أو كذا؟ t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) local ammo = getPedTotalAmmo(player) if ammo < 50 then local weapon = getPedWeapon(player) giveWeaponAmmo(player,weapon,50) end end) Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 تقصد كذا؟ t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) addEventHandler("onPickupHit", root, onPickupHitFunc) end) function onPickupHitFunc ( thePlayer ) -- when a pickup is hit if getPickupType ( source ) == 2 then -- check if it's a weapon pickup local ammo = getPickupAmmo ( source ) -- get the pickup ammo if ammo < 50 then -- if ammo is less than 50 local weapon = getPickupWeapon ( source ) -- store pickup weapon giveWeaponAmmo ( thePlayer, weapon, 50 ) -- give an extra 50 ammo end end end أو كذا؟ t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) local ammo = getPedTotalAmmo(player) if ammo < 50 then local weapon = getPedWeapon(player) giveWeaponAmmo(player,weapon,50) end end) ششكرا تابل الثاني كان الي ابغاااه يعطيك العافية بسس اخوي ابغى السكربت هذا يكون لـ فريق معين مثلآ تيم اسمه Police وابغى لما يكون معه اقل من 50 يعطيه ويقوله تم اعطائك منحه وزي كذا ولما يكون معه اكثر يقوله لاتستطيع لأن معك العدد الازم وبكون ششآكر لكم Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) if getTeamName(getPlayerTeam(player)) == "Police" then local ammo = getPedTotalAmmo(player) if ammo < 50 then local weapon = getPedWeapon(player) giveWeaponAmmo(player,weapon,50) outputChatBox("You have given 50 ammo",player,255,255,0) else outputChatBox("You can't, have more than 50 ammo!",player,255,0,0) end else outputChatBox("You Are Not Police!",player,255,0,0) end end) Link to comment
Hussain Posted May 4, 2012 Author Share Posted May 4, 2012 t = createMarker(0, 0, 0) addEventHandler("onMarkerHit", t, function(player) if getTeamName(getPlayerTeam(player)) == "Police" then local ammo = getPedTotalAmmo(player) if ammo < 50 then local weapon = getPedWeapon(player) giveWeaponAmmo(player,weapon,50) outputChatBox("You have given 50 ammo",player,255,255,0) else outputChatBox("You can't, have more than 50 ammo!",player,255,0,0) end else outputChatBox("You Are Not Police!",player,255,0,0) end end) ربي يعطيك الف الف عآفية الله يجزاااك خير يَ ريت ترسلي ايميلك الجديد بالخاص انا متمرد إن كان عرفتني أدمن بسيرفر حرب العصابات Link to comment
TAPL Posted May 4, 2012 Share Posted May 4, 2012 ربي يعطيك الف الف عآفية الله يجزاااك خير يَ ريت ترسلي ايميلك الجديد بالخاص انا متمرد إن كان عرفتني أدمن بسيرفر حرب العصابات same email just change number 1 to 2 Link to comment
Hussain Posted May 5, 2012 Author Share Posted May 5, 2012 ربي يعطيك الف الف عآفية الله يجزاااك خير يَ ريت ترسلي ايميلك الجديد بالخاص انا متمرد إن كان عرفتني أدمن بسيرفر حرب العصابات same email just change number 1 to 2 تم ... 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