[Wiki]Server functions


#1

Hello,
He is the server functions i found i think this help any one

                [LuaMember("GetPlayers", false)]
		private static LuaTable GetPlayers(){
                                 ...
               luaTable.set_Item(num, num2);
                                ...
                        return luaTable;
                 }

		[LuaMember("GetPlayerName", false)]
		private static string GetPlayerName(int source){
                                ....
                  return expr_06.Name;}

		[LuaMember("GetPlayerGuid", false)]
		private static string GetPlayerGuid(int source){
                                        ...
                 return text ?? client.Guid.PadLeft(16, '0');} 

		[LuaMember("GetPlayerIdentifiers", false)]
		private static LuaTable GetPlayerIdentifiers(int source){
                                              ...
                 Client client = PlayerScriptFunctions.FindPlayer(source);
                                           ...
				foreach (...)
				{
					luaTable.set_Item(num, current);
					num++;
				}
				return luaTable;

		[LuaMember("GetPlayerPing", false)]
		private static int GetPlayerPing(int source)


               	[LuaMember("GetPlayerEP", false)]
		private static string GetPlayerEP(int source){
               return expr_06.RemoteEP.ToString();}

		[LuaMember("GetPlayerLastMsg", false)]
		private static double GetPlayerLastMsg_f(int source){
                  return (double)(Time.CurrentTime - client.LastSeen); }

                 [LuaMember("GetHostId", false)]
                 private static int GetHostId(){


               [LuaMember("DropPlayer", false)]
               private static void DropPlayer(int source, string reason)

               [LuaMember("TempBanPlayer", false)]
               private static void TempBanPlayer(int source, string reason){

		[LuaMember("ldexp", false)]
		public static double ldexp(double x, int exp)

		[LuaMember("frexp", false)]
		public static void frexp(double x, out double fr, out int exp)

               [LuaMember("GetFuncRef", false)]
		private static void GetFuncRef_f(Delegate func, out int reference, out int instance, out string resource)
		
		[LuaMember("RegisterServerEvent", false)]
		private static void RegisterServerEvent_f(string eventName)

		[LuaMember("TriggerClientEvent", false)]
		private static void TriggerClientEvent_f(string eventName, int netID, params object[] args)

		[LuaMember("TriggerEvent", false)]
		private static bool TriggerEvent_f(string eventName, params object[] args)


		[LuaMember("WasEventCanceled", false)]
		private static bool WasEventCanceled_f()

		[LuaMember("CancelEvent", false)]
		private static void CancelEvent_f()

		[LuaMember("StopResource", false)]
		private static bool StopResource_f(string resourceName)

		[LuaMember("StartResource", false)]
		private static bool StartResource_f(string resourceName)

		[LuaMember("SetGameType", false)]
		private static void SetGameType_f(string gameType)

		[LuaMember("SetMapName", false)]
		private static void SetMapName_f(string mapName)

		[LuaMember("PerformHttpRequest", false)]
		private static async Task PerformHttpRequest(string url, Func<object, object, object, LuaResult> cb, string method = "GET", string data = "", LuaTable headers = null)

               [LuaMember("print", false)]
                private static void Print_f(params object[] arguments)

		[LuaMember("RconPrint", false)]
		private static void RconPrint_f(string str)

		[LuaMember("RconLog", false)]
		private static void RconLog_f(LuaTable table)

		[LuaMember("SetResourceInfo", false)]
		public static void SetResourceInfo_f(string key, string value)

		[LuaMember("AddClientScript", false)]
		public static void AddClientScript_f(string script)

		[LuaMember("AddServerScript", false)]
		public static void AddServerScript_f(string script)

		[LuaMember("AddAuxFile", false)]
		public static void AddAuxFile_f(string file)

		[LuaMember("AddResourceDependency", false)]
		public static void AddResourceDependency_f(string resource)

		[LuaMember("RegisterInitHandler", false)]
		public static void RegisterInitHandler_f(Delegate function)

		[LuaMember("SetTimeout", false)]
		private static void SetTimeout_f(int milliseconds, Delegate callback)

		[LuaMember("AddEventHandler", false)]
		private static void AddEventHandler_f(string eventName, Delegate eventHandler)

		[LuaMember("GetInstanceId", false)]
		private static int GetInstanceId_f()
                return (int)



Client functions you can found on [your client folder Fivereborn]\citizen\scripting\lua\natives.lua

Console Commands

[ConsoleCommand("quit")]
private static void Quit_f(CommandManager manager, string command, string[] args)

[ConsoleCommand("refresh")]
private static void Refresh_f(CommandManager manager, string command, string[] args)

[ConsoleCommand("stop")]
private static void Stop_f(CommandManager manager, string command, string[] args)

[ConsoleCommand("start")]
private static void Start_f(CommandManager manager, string command, string[] args)

[ConsoleCommand("restart")]
private static void Restart_f(CommandManager manager, string command, string[] args)