Karuzo Posted January 11, 2014 Share Posted January 11, 2014 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
Castillo Posted January 11, 2014 Share Posted January 11, 2014 bindKey server side has a player argument, bind the key when the player joins ( onPlayerJoin event ). Link to comment
Karuzo Posted January 11, 2014 Author Share Posted January 11, 2014 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
Castillo Posted January 11, 2014 Share Posted January 11, 2014 http://pastebin.com/cbvvR57a Link to comment
Karuzo Posted January 11, 2014 Author Share Posted January 11, 2014 Thank you Solidsnake, it doesn't appear on the ResourceStart now But if i type /vip this error appears : Link to comment
Castillo Posted January 11, 2014 Share Posted January 11, 2014 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
Karuzo Posted January 11, 2014 Author Share Posted January 11, 2014 hey thank you solid it works! if i have more questions ill write them here 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