^iiEcoo'x_) Posted June 17, 2016 Share Posted June 17, 2016 اذا واحد انقتل وكان معه اي نوع من الأسلحة يضهرن مكان موته والي يلمس السلاح ياخذه يضهرن الأسلحة مكان موتهAK-47 و m4 إذا كان معه + اي واحد ينقتل يخسر منه 200 وال200 يضهرن عشكل فلوس والي يلمسهن ياخذ ال 200 Link to comment
^iiEcoo'x_) Posted June 17, 2016 Author Share Posted June 17, 2016 وين الي يقولون عن نفسهم مبرمجين ؟؟ Link to comment
Mr.CoR Posted June 17, 2016 Share Posted June 17, 2016 (edited) خخخ مثال جاهز بالويكي function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z currentweapon = getPlayerWeapon ( source ) --get the current weapon of the dead person createPickup ( x, y, z, 2, currentweapon, 10000, totalammo ) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) --add an event handler for onPlayerWasted + getPedAmmoInClip -- على شان نجيب عدد الطلقات الي بالمخزن getPedTotalAmmo -- على شان نجيب عدد طلقات السلاح takePlayerMoney givePlayerMoney createPickup -- for Money icon https://wiki.multitheftauto.com/wiki/CreatePickup Edited June 17, 2016 by Guest Link to comment
^iiEcoo'x_) Posted June 17, 2016 Author Share Posted June 17, 2016 اتمنى عدم السخرية كلنت function showAmmo(thePlayer, command, who ) local targetPlayer = getPlayerFromName ( who ) if ( thePlayer ) then local ammo = getPedAmmoInClip ( targetPlayer ) outputChatBox ( who .. " has " .. ammo .. " ammo in his active clip" ) else outputChatBox ( "Player '" .. who .. "' not found." ) end end addCommandHandler( "ammo", showAmmo ) myPlayer = getPlayerFromName ( "Someguy" ) -- If a player called 'Someguy' was found then if ( myPlayer ) then -- Retrieve the total amount of ammo for that player, and store it in a variable called 'ammo' ammo = getPedTotalAmmo ( myPlayer ) -- Tell all the players how much ammo 'Someguy' has outputChatBox ( "Someguy's current total ammo: " .. ammo .. "." ) end سيرفر addEventHandler ( "onPickupUse", money, pickupUse ) function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z currentweapon = getPlayerWeapon ( source ) --get the current weapon of the dead person createPickup ( x, y, z, 2, currentweapon, 10000, totalammo ) end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) --add an event handler for onPlayerWasted Link to comment
Simple. Posted June 17, 2016 Share Posted June 17, 2016 local moneyAmmount = 200 function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) x, y, z = getElementPosition ( source ) currentweapon = getPedWeapon ( source ) if currentweapon == 30 or currentweapon == 31 then wep = createPickup ( x, y, z, 2, currentweapon, _, totalammo ) end if getPlayerMoney ( source ) >= moneyAmmount then money = createPickup ( x, y, z, 3, moneyAmmount) takePlayerMoney ( source, moneyAmmount ) end end addEventHandler ( "onPlayerWasted", getRootElement(), createDeathPickup ) addEventHandler ( 'onPickupUse', resourceRoot, function ( player ) if source == wep then destroyElement ( wep ) wep = nil elseif source == money then destroyElement ( money ) money = nil end end ) مو مجرب Link to comment
nxFairlywell Posted June 17, 2016 Share Posted June 17, 2016 جربه و شوف، انا ماجربته ! سيرفر - function createItems( x, y, z, dmns, inter, wp, wAmmo ) if type( x ) == "number" then createPickup( x, y, z + 0.88, 2, wp, 10000, wAmmo ) return true end return false end addEventHandler("onPedWasted", root, function( ammo, killer, weapon ) local x, y, z = getElementPosition( source ) local dmns, inter = getElementDimension( source ), getElementInterior( source ) if getPlayerMoney( source ) >= 200 then takePlayerMoney( source, 200 ) local items=createItems( x+0.79, y, z, 3, 1274, 10000, 200 ) end if getPlayerWeapon(source) == 30 or getPlayerWeapon(source) == 32 then local items=createItems( x, y, z, dmns, inter, getPlayerWeapon(source), getPedTotalAmmo(source, getPedWeaponSlot(source))) end end ) 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