Jump to content

getPlayerAccount won't work ? o_O


crismar

Recommended Posts

Ok so I have this function:

function vipHelp(thePlayer) 
    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("VIP")) then 
    outputChatBox("VIP: /vipfood | /vipwater | /viptemp | /vipblood", thePlayer, 0, 222, 0) 
    outputChatBox("VIP: /vipbandit | /vipnano | /vipitems", thePlayer, 0, 222, 0) 
    end 
end 
addCommandHandler("viphelp", vipHelp, false) 

and I keep getting this error in debugscript:

vipsystem/client.lua:29: attempt to call global 'getPlayerAccount' (a nil value) 

The line 29 is this one:

    if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("VIP")) then 

What is the problem with it ? I can't get this simple script to work and I got no idea why...

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