Jump to content

مشكلة بكود


Recommended Posts

الكود لذا كيلير ع ماعتقد لا قتلت يجيك فلوس بس لا قتلت نفسك بقنبلة تربح فلوس بدون ماتقتل احد

addEvent ("onPlayerKilled", true) 
addEventHandler ("onPlayerKilled", root, function (killer, weapon) 
givePlayerMoney (killer, 300) 
outputChatBox ("You have been killed by " .. getPlayerName (killer), source, 255, 0, 0) 
outputChatBox ("You have killed " .. getPlayerName (source) .. " and you earned $3000", killer, 0, 255, 0) 
end 
) 

اتمنى الحل

Link to comment

مافيه إيفنت اسمه onPlayerKilled الا اذا كنت انت مسويه تقدر تغيره

addEvent ("onPlayerWasted", true) 
addEventHandler ("onPlayerWasted", root, function (ammo,killer, weapon) 
    if killer == source then outputChatBox ("Yoi killed yourself dipshit", killer, 0, 255, 0) return end 
    givePlayerMoney (killer, 300) 
    outputChatBox ("You have been killed by " .. getPlayerName (killer), source, 255, 0, 0) 
    outputChatBox ("You have killed " .. getPlayerName (source) .. " and you earned $300", killer, 0, 255, 0) 
end 
) 

Link to comment

علي ما اعتقد هذا ايفينت تريقر

+

خذ هذا جربه

addEventHandler ("onPlayerWasted", root,  
function (killer, weapon) 
    givePlayerMoney (killer, 300) 
    outputChatBox ("You have been killed by " .. getPlayerName (killer), source, 255, 0, 0) 
    outputChatBox ("You have killed " .. getPlayerName (source) .. " and you earned $3000", killer, 0, 255, 0) 
end 
) 

Link to comment
علي ما اعتقد هذا ايفينت تريقر

+

خذ هذا جربه

addEventHandler ("onPlayerWasted", root,  
function (killer, weapon) 
    givePlayerMoney (killer, 300) 
    outputChatBox ("You have been killed by " .. getPlayerName (killer), source, 255, 0, 0) 
    outputChatBox ("You have killed " .. getPlayerName (source) .. " and you earned $3000", killer, 0, 255, 0) 
end 
) 

parameters of onPlayerWasted

int totalAmmo, element killer, int killerWeapon, int bodypart, bool stealth 

killer = القاتل

source = المقتول

if killer == source then outputChatBox ("Yoi killed yourself :~", killer, 0, 255, 0) return end 

تشوف اذا القاتل نفسه المقتول وتوقف الفنكشن :wink:

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