Command only works when dead or alone in the server
2 replies, posted
So I have this code for to explain donator features (through a picture that pops up), it does work but only when alone or dead.
[CODE]if SERVER then AddCSLuaFile() else
local function donator()
local frame = vgui.Create( "DFrame" )
frame:SetSize( 1001, 560 )
frame:SetTitle( "Donator features!" )
frame:SetVisible( true )
frame:SetDraggable( true )
frame:Center( true )
function frame:Paint()
Derma_DrawBackgroundBlur(self)
// Makes the derma panel rounded.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), frame:GetTall(), Color(0, 0, 0, 200) )
// Header Color.
draw.RoundedBox( 2, 0, 0, frame:GetWide(), 23, Color(0,140,191,200) )
end
frame:MakePopup()
HTMLTest = vgui.Create("HTML", frame)
HTMLTest:Dock( FILL )
HTMLTest:SetPos(50,50)
HTMLTest:SetSize(ScrW() - 100, ScrH() - 100)
HTMLTest:OpenURL("http://i.imgur.com/4FeLqeZ.png")
end
concommand.Add("DonatorFeatures", donator)
hook.Add( "OnPlayerChat", "DonatorFeatures", function( ply, text )
if ( text == "!donatorfeatures" ) then
RunConsoleCommand( "DonatorFeatures" )
end
end )
end[/CODE]
It only works when I'm on my own on the server (when I talk it says [Superadmin] OTG | Ganoal:!donatorfeatures) or dead when with another (when I talk it says *DEAD* [Superadmin] OTG | Ganoal:!donatorfeatures) but when I'm with another person on my server and alive it doesn't work.
Anyone know a fix? (when I talk when I'm alive and other people are in the server it says randommurdername:!donatorfeatures)
Use SERVER PlayerSay like this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/chat_commands/chat_commands.lua.html[/url]
And network the opening, similar to this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/vgui/open_vgui_based_on_keypress.lua.html[/url]
Seriously? Like, fucking seriously?
This is your FOURTH thread about this.
And you got the answer in every single one of those threads, if you seriously can't fix the code with what ms333 told you, this is a "Fix for me" thread
Sorry, you need to Log In to post a reply to this thread.