• MENU F4 FOR VIPS, How to call this function?
    2 replies, posted
Hey guys! I made a new tab on my F4 MENU inside the DarkRP called "Premium Shop" only for vips but I can't understand a little of LUA CODE but I'm trying to learn and code it =), hmmm... and can any1 help me please?! Like this: IF people IS NOT VIP then SHOW A MESSAGE ("bla bla bla") IF people is VIP or ADMIN then SHOW THE THINGS ... [CODE] function GM:VIPTab() local VIPTab = vgui.Create("DPanel") //Called by DarkRP whenever the panel is shown to update its info. VIPTab.Update = function(self) end local VIPTab = vgui.Create("DPanelList") function VIPTab:Update() self:Clear(true) local text= vgui.Create("DLabel", VIPTab) text:SetText(" TEXT THAT SHOWN IN BOX !") text:SetColor(Color(255,255,255,255)) text:SizeToContents() end customCheck = function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() if ply = vip or ply:IsAdmin then -- If ply is vip or IsAdmin then return the menu return VIPTab end -- Returning the VIPTab if people is vip? (Super wrong =/ ) end [/CODE]
Mabye a PLY:Check? Not too familiar with lua.
try this [code]!self:IsUserGroup("VIP") and not self:IsSuperAdmin() and not self:IsAdmin() then GAMEMODE:Notify(self, 1, 4, string.format("bla bla bla")) return end[/code]
Sorry, you need to Log In to post a reply to this thread.