Sasu Posted February 28, 2013 Posted February 28, 2013 function Vip ( thePlayer ) local cuenta = getPlayerAccount( thePlayer ) local cuenta2 = getAccountName( cuenta ) if isObjectInACLGroup ("user."..cuenta2, aclGetGroup ( "VIP" ) ) then setPedArmor ( thePlayer, 100 ) exports["Evo-notificaciones"]:showBox ( thePlayer, "warning","VIP: Como Vip Apareseras Con 100 % De Armadura Y Jetpack" ) else outputChatBox("No eres VIP", thePlayer, 0, 0, 255, false) end end addEventHandler("onPlayerWasted", getRootElement(), Vip) addEventHandler("onPlayerLogin", getRootElement(), Vip) Pls I need help Errors on debug 3: WARNING: VipArmor.lua:2: Bad argumnet @ 'getPlayerAccount' [Expected element at argument 1] WARNING: VipArmor.lua:2: Bad argumnet @ 'getAccountName' [Expected account at argument 1, got boolean] ERROR: VipArmor.lua:4: attempt to concatenate local 'cuenta2'(a boolean value) State: Inactive
PaiN^ Posted February 28, 2013 Posted February 28, 2013 function Vip ( ) local accName = getAccountName( getPlayerAccount(source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setPedArmor ( source, 100 ) exports["Evo-notificaciones"]:showBox ( source, "warning","VIP: Como Vip Apareseras Con 100 % De Armadura Y Jetpack" ) else outputChatBox("No eres VIP", source, 0, 0, 255, false) end end addEventHandler("onPlayerWasted", getRootElement(), Vip) addEventHandler("onPlayerLogin", getRootElement(), Vip) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Sasu Posted February 28, 2013 Author Posted February 28, 2013 function Vip ( ) local accName = getAccountName( getPlayerAccount(source) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then setPedArmor ( source, 100 ) exports["Evo-notificaciones"]:showBox ( source, "warning","VIP: Como Vip Apareseras Con 100 % De Armadura Y Jetpack" ) else outputChatBox("No eres VIP", source, 0, 0, 255, false) end end addEventHandler("onPlayerWasted", getRootElement(), Vip) addEventHandler("onPlayerLogin", getRootElement(), Vip) When a player VIP die, it doesnt give armor and no error on debug State: Inactive
PaiN^ Posted February 28, 2013 Posted February 28, 2013 What you want is to give an armor to any VIP player after he dies right ?? if so, Then change the event : "onPlayerWasted" To "onPlayerSpawn" " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Sasu Posted February 28, 2013 Author Posted February 28, 2013 What you want is to give an armor to any VIP player after he dies right ??if so, Then change the event : "onPlayerWasted" To "onPlayerSpawn" Nothing State: Inactive
Sasu Posted February 28, 2013 Author Posted February 28, 2013 Use it server side. Yes, it is serve-side in meta.xml State: Inactive
PaiN^ Posted February 28, 2013 Posted February 28, 2013 function vip () local acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("VIP") then setPlayerArmor(source, 100) else outputChatBox("No eres VIP", source, 255, 0, 0, true) end end ) addEventHandler("onPlayerLogin", root, vip) addEventHandler("onPlayerSpawn", root, vip) " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
X-SHADOW Posted February 28, 2013 Posted February 28, 2013 Or Try Using This . addEventHandler('onPlayerSpawn', root, addEventHandler('onPlayerLogin', root, function(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "VIP" ) ) ) then setPlayerArmor(thePlayer, 100) else outputChatBox("No eres VIP", thePlayer, 255, 0, 0, true) end end)) My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
PaiN^ Posted February 28, 2013 Posted February 28, 2013 Or Try Using This . addEventHandler('onPlayerSpawn', root, addEventHandler('onPlayerLogin', root, function(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "VIP" ) ) ) then setPlayerArmor(thePlayer, 100) else outputChatBox("No eres VIP", thePlayer, 255, 0, 0, true) end end)) -_-" " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
Sasu Posted February 28, 2013 Author Posted February 28, 2013 Or Try Using This . addEventHandler('onPlayerSpawn', root, addEventHandler('onPlayerLogin', root, function(thePlayer) local account = getPlayerAccount(thePlayer) if (not account or isGuestAccount(account)) then return end local accountName = getAccountName(account) if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "VIP" ) ) ) then setPlayerArmor(thePlayer, 100) else outputChatBox("No eres VIP", thePlayer, 255, 0, 0, true) end end)) bad argument @ addEventHandler[Expected function at argument 3, got boolean] function vip () local acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("VIP") then setPlayerArmor(source, 100) else outputChatBox("No eres VIP", source, 255, 0, 0, true) end end ) addEventHandler("onPlayerLogin", root, vip) addEventHandler("onPlayerSpawn", root, vip) I fixed ._. but its work function vip () local acc = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..acc, aclGetGroup("VIP")) then setPlayerArmor(source, 100) else outputChatBox("No eres VIP", source, 255, 0, 0, true) end end addEventHandler("onPlayerLogin", root, vip) addEventHandler("onPlayerSpawn", root, vip) State: Inactive
Sasu Posted February 28, 2013 Author Posted February 28, 2013 Thanks all for responding =) State: Inactive
PaiN^ Posted March 1, 2013 Posted March 1, 2013 You're welcome " Keep Thinking Different . " - Steve Jops -------------------- Don't send me PMs asking for help, I Won't reply !
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