Author Topic: Fixing a chat command  (Read 1611 times)

0 Members and 1 Guest are viewing this topic.

Offline CrazyCallum113

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Fixing a chat command
« on: October 01, 2013, 04:24:46 AM »
Okay so I created a chat command to link to a url however when someone types it it opens the browser for everyone! How can I fix this?

Here's my code:
Code: [Select]
function ulx.fixerrors( calling_ply )
    for _, pl in ipairs( player.GetAll() ) do pl:SendLua([[gui.OpenURL("http://steamcommunity.com/sharedfiles/filedetails/?id=179287953")]]) end
end
local fixerrors = ulx.command( CATEGORY_NAME, "ulx fixerrors", ulx.fixerrors, "!fixerrors", true )
fixerrors:defaultAccess( ULib.ACCESS_ADMIN )
fixerrors:help( "Brings up the workshop collection of content to fix any errors on the server." )

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given