Jump to content

Player VIP


Sasu

Recommended Posts

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 :S

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
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
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 :S

Link to comment
    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

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
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
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...