Skip to content

Latest commit

 

History

History
723 lines (644 loc) · 23.1 KB

exports.md

File metadata and controls

723 lines (644 loc) · 23.1 KB

Below is a list of exports and what they do for Nerd Gaming V1.1.3

NGAdministration

  • Client
    • nil openBanWindow( string account ): Opens the user ban window to the desired account
  • <li>
        <strong>Server</strong>
        <ul>
            <li>table getAllStaff ( ): <em>Returns a table of all the online staff, the table index is their rank (Eg. Level 1, Level 2, etc...)</em></li>
            <li>boolean isPlayerStaff ( player thePlayer ): <em>Check to see if the player is in any of the staff ACLs</em></li>
            <li>boolean isPlayerInACL ( player thePlayer, string aclGroup ): <em>Check if the player is in the ACL group</em></li>
            <li>table getOnlineStaff ( ): <em>Returns a table containing all the oline staff, no matter what level</em></li>
            <li>var getPlayerStaffLevel ( player thePlayer [, type=nil ] ): <em>Returns the player staff level. If type is string, it returns Level x (eg. Level 1) - If set to int, it returns their level as an integer (Eg. 1, 2, etc..) - If not set, it returns String Level, Int Levl</em></li>
            <li>nil removeAccount( string account [, player source] ): <em>*http* Removes a player account from the server and MySQL databsae</em></li>
      </ul>
    </li>
    



NGAmmunation

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li><em>None</em></li>
      </ul>
    </li>
    



NGAntiRestart

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>vehicle createPlayerVehicle ( player thePlayer, int vehicleID, marker sourceMarker [, boolean doWarp=false] ) <em>: Creates a player vehicle that will be destroyed when this function is called for the player again, or the player disconnects - Used by the Vehicle spawners</em></li>
      </ul>
    </li>
    



NGBank

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>boolean doesBankAccountExist ( string accountName ): <em>Returns if the account name is registered in the accounts table</em></li>
    		<li>boolean createBankAccount ( string accountName ): <em>Adds the account to the accounts table and bank_accounts SQL table</em></li>
    		<li>nil saveBankAccounts ( ): <em>Saves all the bank accounts to the NG database</em></li>
    		<li>table getBankAccounts ( ): <em>Returns all the accounts with their balances</em></li>
    		<li>boolean withdraw ( player thePlayer, int amount ): <em>Takes money from player bank account (THIS WILL STILL WORK WITH INSIGNIFICANT FUNDS)</em></li>
    		<li>boolean deposit ( player thePlayer, int amount ): <em>Adds money to the players bank account (THIS WILL STILL WORK WITH INSIGNIFICANT FUNDS)</em></li>
    		<li>int getPlayerBank ( player thePlayer ): <em>Returns the players bank account balance</em></li>
    		<li>int getAccountBalance ( string theAccount ): <em>Returns the account balance</em></li>
    	</ul>
    </li>
    



NGBans

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>nil banAccount ( string accountName [, int unbanDay=1, int unbanMonth=1, int unbanYear=9999, string reason="Not defined", string banner="Server" ] ): <em>Bans a user account, serial, and IP address</em></li>
    		<li>int saveBans ( ): <em>Saves the bans to the database, returns the number of server bans</em></li>
    		<li>boolean unbanAccount ( string account ): <em>Removes a ban from the server database, returns if the unban was successful</em></li>
    		<li>boolean isSerialBanned ( string serial ): <em>Returns if the serial is banned</em></li>
    		<li>nil loadBanScreenForPlayer ( player thePlayer ): <em>Loads the banned message for a banned player</em></li>
    	</ul>
    </li>
    



NGChat

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>nil outputLawMessage ( string message [, int r=255, int g=255, int b=255, boolean useHex=false] ): <em>Outputs a message to all law enforcement players</em></li>
    		<li>string getChatLine ( player thePlayer, string message): <em>Returns how the chat line should be to output for a player with a message</em></li>
    		<li>string getPlayerTags ( player thePlayer ): <em>returns a string of tags to display before the player name</em></li>
    	</ul>
    </li>
    



NGDrugs

  • Client
    • nil/boolean useDrug ( string drug, int amount ): Enable drug effects for localplayer
  • <li>
        <strong>Server</strong>
        <ul>
            <li><em>None</em></li>
    	</ul>
    </li>
    



NGEvents

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>boolean isPlayerInEvent ( player thePlayer ): <em>Returns if the player is in the current event</em></li>
            <li>table getEventInfo ( ): <em>Returns a table containing all event information</em></li>
    	</ul>
    </li>
    



NGFPS

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li><em>None</em></li>
    	</ul>
    </li>
    



NGGamemode

  • Client
    • None
  • Server
    • None



NGGroups

  • Client
    • None
  • <li>
        <strong>Server</strong>
        <ul>
            <li>boolean doesGroupExist ( string group ): <em>Returns if the group already exists on the server</em></li>
            <li>boolean isRankInGroup ( string group, string rankName ): <em>Returns if the rank is in the group</em></li>
    		<li>nil saveGroups ( ): <em>Saves all groups to the server database</em></li>
    		<li>table getGroups ( ): <em>Returns a table with all groups and all their information</em></li>
    		<li>int, int, int getGroupColor ( string group ): <em>Returns the group color in an RGB format</em></li>
    		<li>boolean createGroup ( string name, table color, string type, string owner ): <em>Creates a group on the server, if all the information is valid</em></li>
    		<li>boolean deleteGroup ( string group ): <em>Deletes a group the server and the server SQL</em></li>
    		<li>boolean setAccountRank ( string group, string account, string newrank ): <em>Sets the rank for an account within a group</em></li>
    		<li>boolean setPlayerGroup ( player thePlayer, string group ): <em>Sets the group of a player</em></li>
    		<li>int getGroupBank ( string group ): <em>Returns the bank balance of a group</em></li>
    		<li>boolean setGroupBank ( string group, int amount ): <em>Sets the bank balance of a group</em></li>
    		<li>boolean groupClearLog ( string group ): <em>Clears the logs of a group</em></li>
    		<li>nil outputGroupLog ( string group, string log [, player responsiblePlayer ] ): <em>Logs an action to a group</em></li>
    		<li>table getGroupLog ( string group ): <em>Returns a table containing all the logs of a group</em></li>
    		<li>boolean isRankInGroup ( string group, string rank ): <em>Returns if a group contains a rank</em></li>
    		<li>nil/string getPlayerGroup ( player thePlayer ): <em>Returns the group name of a player</em></li>
    		<li>nil outputGroupMessage ( string message, string group [, boolean blockTag ] ): <em>Outputs a message to all online members of a group</em></li>
    	</ul>
    </li>
    



NGGym

  • Client
    • None
  • Server
    • None



NGHealthPacks

  • Client
    • boolean useHealthPack ( ): Uses a player health pack, if their health is less than 90%
  • Server
    • boolean useHealthPack ( player thePlayer ): Uses a player health pack, if their health is less than 90%



NGHospitals

  • Client
    • boolean isClientDead ( ): Returns if the player is dead
  • Server
    • None



NGInformation

  • Client
    • None
  • Server
    • None



NGInventory

  • Client
    • None
  • Server
    • None



NGJobs

  • Client
    • boolean create3DText ( string text, table position, table color [, element parent=nil, table settings={} ] ): Creates a 3D text element that will be rendered in the GTA world
  • Server
    • boolean addPlayerToJobDatabase ( player thePlayer ): Adds a player account to th SQL jobdata table
    • boolean updateJobColumn ( string account, string column, string updateTo ): Updates a players job data column information. If updateTo is "AddOne", it will add 1 to the existing value
    • nil setPlayerJob ( player thePlayer, string theJob ): Sets the players job
    • boolean create3DText ( string text, table position, table color [, element parent=nil, table settings={} ] ): Creates a 3D text element that will be rendered in the GTA world
    • nil updateRank ( player thePlayer, string theJob ): Useless function
    • table getJobRankTable ( ): Returns a table containing all the jobs, their ranks, and requirements



NGLogin

  • Client
    • boolean isClientLoggedin ( ): Returns if the client is logged into the server
  • Server
    • None



NGLogin

  • Client
    • boolean isClientLoggedin ( ): Returns if the client is logged into the server
  • Server
    • None



NGLogs

  • Client
    • None
  • Server
    • nil outputPunishLog ( player thePlayer, var responsibleElement, string log ): Outputs to the NG punishment log, responsibleElement can be either a string or player element
    • nil outputActionLog ( string log ): Outputs a message to the server action log
    • nil outputChatLog ( string chat, string log ): Outputs a message to the specified chat (action, punish, chat, server, sql)
    • nil outputServerLog ( string log ): Outputs a message to the server log
    • nil outputSQLLog ( string log ): Outputs a message to the SQL log



NGLottery

  • Client
    • None
  • Server
    • timer getLotteryTimer ( ): Returns the lottery timer element
    • nil generateNextLottery ( ): Generates the next winning number, prize, and resets the lottery timer
    • int getLotteryWinningNumber ( ): Returns the winning lottery number



NGMessages

  • Client
    • boolean sendClientMessage ( string message [, int r=255, int g=255, b=255 ] ): Sends a notification to the player through the top message bar
  • Server
    • boolean sendClientMessage ( string message, player/root thePlayer [, int r=255, int g=255, b=255 ] ): Sends a notification to the player through the top message bar



NGMessages

  • Client
    • boolean sendClientMessage ( string message [, int r=255, int g=255, b=255 ] ): Sends a notification to the player through the top message bar
  • Server
    • boolean sendClientMessage ( string message, player/root thePlayer [, int r=255, int g=255, b=255 ] ): Sends a notification to the player through the top message bar



NGPeak

  • Client
    • None
  • Server
    • None



NGPhone

  • Client
    • string getSetting ( string setting ): Returns the user setting value for the specified setting
    • boolean updateSetting ( string setting, string value ): Updates a specified user setting
  • Server
    • None



NGPlayerFunctions

  • Client
    • string getToday ( ): Returns a string of the current date in YYYY-MM-DD (Ex. 2015-05-10)
    • boolean isClientCursorShowing ( ): Returns if the clients cursor is visible
    • boolean outputDxLog ( string message ): Outputs to the side DX message bar (Will only be visible if the users setting is enabled)
    • boolean createWaypointLoc ( float x, float y, float z ): Locates a specific location on the users minimap
    • boolean waypointUnlocate ( ): Unlocates a location, if the users has one located
    • boolean waypointIsTracking ( ): Returns if the client is currently tracking something
    • boolean setWaypointAttachedToElement ( element trackingElement ): Attaches the waypoint blip to the tracking element
  • Server
    • int getPlayerPlaytime ( player thePlayer ): Returns the player play-time in milliseconds
    • boolean setPlayerPlaytime ( player thePlayer, int time ): Sets a users play-time, with time being milliseconds
    • boolean deletePlayerPlaytime ( player thePlayer ): Removes a players play-time from the server
    • boolean setTeam ( player thePlayer, string teamName ): Sets the players team
    • boolean isLawTeam ( string team ): Returns if the team is a law-enforcement team
    • player/boolean getPlayerFromNamePart ( string partName ): Returns a player based on a part of their name - if more than 2 players have the part it will return false
    • player/boolean getPlayerFromAccount ( string accountName ): Returns the player with the account name, or false
    • string getRunningMathEquation ( ): Returns a string of the current math equation
    • string getToday ( ): Returns a string of the current date in YYYY-MM-DD (Ex. 2015-05-10)



NGPolice

  • Client
    • boolean outputDispatchMessage ( string message ): Send a dispatch message to the client
    • boolean isPlayerJailed ( ): Returns if the client is in jail
  • Server
    • boolean jailPlayer ( player thePlayer, int duration [, boolean announce=false, element responsibleElement=nil, string reason="Classified" ] ): Puts a player in jail
    • boolean unjailPlayer ( player thePlayer [, boolean triggerClient=false ] ): Releases a player from jail
    • boolean isPlayerJailed ( player thePlayer ): Returns if a player is currently in jail
    • table getJailedPlayers ( ): Returns a table containing all jailed players
    • boolean outputDispatchMessage ( string message ): Send a dispatch message to all law-enforcement players



NGPunishPanel

  • Client
    • None
  • Server
    • boolean outputPlayerPunishLog ( player thePlayer [, string admin="Server", string log="nil" ] ): Adds a log to the players punishment panel



NGShops

  • Client
    • None
  • Server
    • None



NGSpawners

  • Client
    • None
  • Server
    • None



NGSQL

  • Client
    • None
  • Server
    • table db_query ( string query, ... ): Returns a table with the results of the query
    • boolean db_exec ( string query, ... ): Returns a boolean if the exec was successful
    • boolean createAccount ( string accountName ): Adds an account to the servers SQL database
    • boolean/table account_exist ( string accountName ): Returns false if the account doesn't exist, or returns a table with all the account information if it does
    • boolean saveAllData ( [ boolean useTime=true ] ): Manually saves all the server data
    • boolean savePlayerData ( player thePlayer [, boolean logMsg=true, boolean deletePlaytime=false] ): Saves all the account information for a specific account



NGTurf

  • Client
    • None
  • Server
    • table turfLocs( ): Returns a table with all the turf locations
    • boolean setTurfOwner ( int turfId, string owner ): Sets a specific turf owner
    • boolean saveTurfs ( ): Saves all the turfs and their information
    • boolean updateTurfGroupColor ( group ): Updates the color of turfs when a group changes their color



NGVehicles

  • Client
    • int getVehicleSpeed ( vehicle theVehicle [, string speedType="kph" ] ): Returns the vehicle speed
  • Server
    • boolean showVehicle ( int vehicleId, boolean state [, player thePlayer, string message ] ): Shows or hides a vehicle owned by a player
    • table getAccountVehicles ( string account ): Returns a table of all the account vehicles
    • table getAllAccountVehicles ( string account ): Same as getAccountVehicles
    • boolean warpVehicleToPlayer ( int vehicleId, player thePlayer ): Warps an owned vehicle to a player
    • boolean recoverVehicle ( player source, int vehicleId ): Used by the NG phone, used to recover a vehicle
    • boolean sellVehicle ( player source, int vehicleId ): Used by the NG phone, used to sell a vehicle



NGVIP

  • Client
    • boolean isPlayerVIP ( ): Returns if the player is a VIP member
    • int getVipLevelFromName ( string level ): Returns an integer representing the VIP level
  • Server
    • boolean checkPlayerVipTime ( player thePlayer ): Checks the players VIP time to see if it is expired
    • boolean isDatePassed ( string date ): Checks to see if a date has passed (Input format: YYYY-MM-DD)
    • int getVipPayoutTimerDetails ( ): Returns the next VIP payout time in milliseconds
    • int getVipLevelFromName ( string level ): Returns an integer representing the VIP level
    • boolean isPlayerVIP ( player thePlayer ): Returns if the player is a VIP member



NGWarpManager

  • Client
    • boolean makeWarp ( table inputData ): Creates a warping point
  • Server
    • None