General > Developers Corner
Custom Command to Open a Specific URL
[DP] ISR Mafia:
Hey Everyone !
--- Code: ---function urlCommand( pl, text, teamonly )
if (text == "!site") then
pl:SendLua([[gui.OpenURL("http://dudeperfectgmodcommunity.weebly.com")]]) -- Change ADDRESS to your chosen page.
for k, v in pairs(player.GetAll()) do v:ChatPrint( " " .. pl:Nick() .. " has Entered DP's Site & Checks What's New via !site" )
end
end
end
hook.Add( "PlayerSay", "Chat", urlCommand
--- End code ---
i tried this code to open that url for everyone who says !site in chat (my server's site) but i cant get it to work can anyone help me make one that will actually work?
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version