|Mr|-Talal07-| Posted August 8, 2012 Share Posted August 8, 2012 يا شباب انا كنت ناوي اسوي مود مره حلو اذا كتبت في اف8 drop amount = عدد الرصاص الي تبي تنزله لكن ما اشتغل معي ذا هو الكود function drop(source,command,amount) local weapon = getPedWeapon(source) local x,y,z = getElementPosition(source) local ammo = getPedTotalAmmo(source) local amm = tonumber(amount) if ( ammo <= amm ) then createPickup(x,y,z,2,weapon,0,amm) outputChatBox("*You Are Drop Successfuly",source,0,255,0,true) else outputChatBox("*You Don't Have " .. amount ..".",source,255,0,0,true) end end addCommandHandler("drop",drop) WHF!! is this Link to comment
3NAD Posted August 8, 2012 Share Posted August 8, 2012 ججرب ذا function drop(player,command,amount) local weapon = getPedWeapon(player) local x,y,z = getElementPosition(player) local ammo = getPedTotalAmmo(player) local amm = tonumber(amount) if ( ammo >= amm ) then createPickup(x,y,z,2,weapon,0,amm) outputChatBox("*You Are Drop Successfuly",player,0,255,0,true) else outputChatBox("*You Don't Have " .. amount ..".",player,255,0,0,true) end end addCommandHandler("drop",drop) Link to comment
TAPL Posted August 8, 2012 Share Posted August 8, 2012 -- Server Side -- function drop(player,cmd,amount) local x,y,z = getElementPosition(player) local weapon = getPedWeapon(player) local ammo = getPedTotalAmmo(player) local amount = tonumber(amount) if ammo >= amount then takeWeapon(player,weapon,amount) setElementID(createPickup(x,y+5,z,2,weapon,5000,amount),"WeaponPickUp") outputChatBox("*You Are Drop Successfuly",player,0,255,0,true) else outputChatBox("*You Don't Have "..amount..".",player,255,0,0,true) end end addCommandHandler("drop",drop) addEventHandler("onPickupHit", root, function(player) if getElementID(source) == "WeaponPickUp" then setTimer(destroyElement,50,1,source) outputChatBox("You Pickup Droped ammo..",player,150,0,255,true) end end) Link to comment
|Mr|-Talal07-| Posted August 9, 2012 Author Share Posted August 9, 2012 اشتغل مشكورين 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