Sasu Posted February 28, 2013 Share 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) Link to comment
PaiN^ Posted February 28, 2013 Share 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) Link to comment
Sasu Posted February 28, 2013 Author Share 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 Link to comment
PaiN^ Posted February 28, 2013 Share 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" Link to comment
Sasu Posted February 28, 2013 Author Share 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 Link to comment
iPrestege Posted February 28, 2013 Share Posted February 28, 2013 Use it server side. Link to comment
Sasu Posted February 28, 2013 Author Share Posted February 28, 2013 Use it server side. Yes, it is serve-side in meta.xml Link to comment
PaiN^ Posted February 28, 2013 Share 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) Link to comment
X-SHADOW Posted February 28, 2013 Share 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)) Link to comment
PaiN^ Posted February 28, 2013 Share 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)) -_-" Link to comment
Sasu Posted February 28, 2013 Author Share 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) Link to comment
Sasu Posted February 28, 2013 Author Share Posted February 28, 2013 Thanks all for responding =) 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