ULX

Author Topic: Custom Command to Open a Specific URL  (Read 3458 times)

0 Members and 1 Guest are viewing this topic.

Offline [DP] ISR Mafia

  • Newbie
  • *
  • Posts: 7
  • Karma: -1
Custom Command to Open a Specific URL
« on: June 03, 2015, 11:17:30 PM »
Hey Everyone !

Code: [Select]
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

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