Cocodrilo Posted April 28, 2013 Share Posted April 28, 2013 What is wrong? function killReward (totalAmmo, killer, killerweapon, bodypart, stealth) local accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then if (killer) and (killer ~= source) then givePlayerMoney (killer, 1000) end end end addEventHandler ("onZombieWasted", getRootElement(), killReward) Link to comment
DNL291 Posted April 28, 2013 Share Posted April 28, 2013 thePlayer isn't defined. "onZombieWasted" must be a custom event because it doesn't exist. Link to comment
MIKI785 Posted April 28, 2013 Share Posted April 28, 2013 If the account is supposed to be the killer's account, change thePlayer to killer... function killReward (totalAmmo, killer, killerweapon, bodypart, stealth) local accountname = getAccountName(getPlayerAccount(killer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then if (killer) and (killer ~= source) then givePlayerMoney (killer, 1000) end end end addEventHandler ("onZombieWasted", getRootElement(), killReward) Link to comment
iPrestege Posted April 28, 2013 Share Posted April 28, 2013 No try this but not tested ; function killReward ( killer,weapon,bodypart ) local accountname = getAccountName(getPlayerAccount(killer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("VIP")) then if (killer) and (killer ~= source) then givePlayerMoney (killer,1000) end end end addEventHandler ("onZombieWasted", getRootElement(), killReward) The killer is on the parameter one -.- read here : https://wiki.multitheftauto.com/wiki/Slothman/Zombies#onZombieWasted Link to comment
codeluaeveryday Posted April 28, 2013 Share Posted April 28, 2013 I hope your using addEvent() function. 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