Jump to content

Check if User is a VIP


Karuzo

Recommended Posts

Hey Guys,

i want to check if a player is a VIP , i've done that now but, if i want to open the Panel it doesnt appear..

Serverside :

function VIPMENUTRIGGER ( thePlayer , commandName ) 
   if isObjectInACLGroup("user."..getAccountName( getPlayerAccount(source)), aclGetGroup("VIP")) then  
   triggerClientEvent (thePlayer,"VIPSuccess", source) 
   else 
   outputChatBox ( "Youre not a VIP!!",thePlayer) 
   end 
 end 
bindKey("F10", "down", VIPMENUTRIGGER ) 

function OpenPanel() 
    guiSetVisible(VIP.window[1], true) 
    guiSetVisible(VIP.window[1], true) 
    guiSetVisible(VIP.window[2], true) 
    guiSetVisible(VIP.window[3], true) 
    guiSetVisible(VIP.window[4], true) 
    guiSetVisible(VIP.window[5], true) 
    guiSetVisible(VIPimage, true) 
    showCursor(true) 
end 
addEvent("VIPSuccess", true) 
addEventHandler("VIPSuccess", getRootElement(), OpenPanel) 

No Errors. btw im in the ACL Group "VIP" ^^

Link to comment

Well ok ,

i've changed it to :

function VIPMENUTRIGGER ( thePlayer , commandName ) 
   if isObjectInACLGroup("user."..getAccountName( getPlayerAccount(source)), aclGetGroup("VIP")) then  
   triggerClientEvent (thePlayer,"VIPSuccess", source) 
   else 
   outputChatBox ( "VIP deilsin!!Vip icin : [url=http://www.yvgaming.de]www.yvgaming.de[/url] ye git!",thePlayer) 
   end 
 end 
addCommandHandler("vip", VIPMENUTRIGGER) 

Cause i don't want to reconnect ^^

But still same problem.

But now the panel appears automatically if i start the resource...

full code:

gui.lua :

http://pastebin.com/WCR7AAYJ

s_vip.lua :

http://pastebin.com/nNJeXngF

Link to comment
function VIPMENUTRIGGER ( thePlayer , commandName ) 
    if isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( thePlayer ) ), aclGetGroup ( "VIP" ) ) then 
        triggerClientEvent ( thePlayer, "VIPSuccess", thePlayer ) 
    else 
        outputChatBox ( "VIP deilsin!!Vip icin : [url=http://www.yvgaming.de]www.yvgaming.de[/url] ye git!", thePlayer ) 
    end 
end 
addCommandHandler ( "vip", VIPMENUTRIGGER ) 

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