matttu Posted November 24, 2013 Share Posted November 24, 2013 Hey! My problem is, how to i put that VIP-s will get 10 money, I want that people in VIP acl group get 10 instead of 5, please give me some directions or some kind of help! =) Thanks! =) addEventHandler( "onZombieGetsKilled", getRootElement(), function( killer ) givePlayerMoney( killer, 5 ); end ) Link to comment
glowdemon1 Posted November 24, 2013 Share Posted November 24, 2013 if (isObjectInACLGroup(killer,'vip')) then givePlayerMoney(killer,10) else etc etc. Link to comment
matttu Posted November 24, 2013 Author Share Posted November 24, 2013 oh... that was easy Thanks man have learned lua only 5 months and still havent learned anything about ACl, only how to add ppl and resources there, thats all, but THANK YOU :3 Link to comment
TAPL Posted November 25, 2013 Share Posted November 25, 2013 if (isObjectInACLGroup(killer,'vip')) then givePlayerMoney(killer,10) else etc etc. Wrong arguments, check the wiki. https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup Also does the event 'onZombieGetsKilled' even exist? https://wiki.multitheftauto.com/wiki/Slothman/Zombies The correct event is: onZombieWasted. Link to comment
xScatta Posted November 26, 2013 Share Posted November 26, 2013 Try this one if you don't understand ( not tested ). addEventHandler( "onZombieGetsKilled", getRootElement(), function( killer ) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(killer)),aclGet("Vip")) then givePlayerMoney( killer, 10 ) else givePlayerMoney( killer, 5 ) 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