matttu Posted November 24, 2013 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 )
glowdemon1 Posted November 24, 2013 Posted November 24, 2013 if (isObjectInACLGroup(killer,'vip')) then givePlayerMoney(killer,10) else etc etc.
matttu Posted November 24, 2013 Author 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
TAPL Posted November 25, 2013 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.
xScatta Posted November 26, 2013 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 )
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