Jump to content

Player VIP


Sasu

Recommended Posts

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

State: Inactive

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

Posted
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

State: Inactive

Posted

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 !

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

State: Inactive

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

Posted

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%

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

Posted
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

Posted

You're welcome

" Keep Thinking Different . " - Steve Jops

--------------------

Don't send me PMs asking for help, I Won't reply !

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