Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/19/19 in all areas

  1. Version 2.1

    708 downloads

    With this script you can easily create custom timer. The file is fully commented and should be easy to understand. The file in Shared is required - and then use either the file in Server or in Client depending on where you are using it. You have to use the constructor to create the timer. Examples: Examples: // Yes, the method can be private // private void testTimerFunc(Client player, string text) { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER] " + text); } void testTimerFunc() { NAPI.Chat.SendChatMessageToAll("[TIMER2] Hello"); } [Command("ttimer")] public void timerTesting(Client player) { // Lamda for parameter // new Timer(() => testTimerFunc(player, "hi"), 1000, 1); // Normal without parameters // new Timer(testTimerFunc, 1000, 1); // Without existing method // var timer = new Timer(() => { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER3] Bonus is da best"); }, 1000, 0); // Kill the timer // timer.Kill(); }
    1 point
  2. Hey, Im new to the RAGE-MP. I started moving from GT-MP and have issue with events. PlayerConnected doesn't trigger also PlayerDisconnected tells me that i have wrong number of parameters dispite using sample code. using GTANetworkAPI; namespace RP { public class ConnectionHandler : Script { [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnect(Client player) { NAPI.Util.ConsoleOutput("Connected"); World.Players.Add(player, new Player(player)); } [ServerEvent(Event.PlayerDisconnected)] public void OnPlayerDisconnect(Client player, DisconnectionType type, string reason) { if(type == DisconnectionType.Left) NAPI.Chat.SendChatMessageToAll("~b~" + player.Name + "~w~ left. " + reason); World.Players.Remove(player); } } } I downloaded GTANetworkAPI version 3.6 as NuGet Package
    1 point
  3. delete the content from the bin folder and compile the sln again
    1 point
  4. do you have WiredPlayers-Client.sln complied?
    1 point
  5. So etwas gehört hier nicht hin, bitte schreibe Beiträge wie diesen in das GVMP Forum.
    1 point
  6. В index.js пишите примерно так: require('./путь/к/папке');
    1 point
    discord nitro sync ?
    1 point
  7. mp.events.add('loginInformationToServer', (usuario, contraseña) => { activeCam = false; if (sceneryCamera !== null) sceneryCamera.setActive(activeCam); mp.game.cam.renderScriptCams(false, true, 2000, true, false); mp.events.callRemote('OnPlayerLoginAttempt', usuario, contraseña); }); Takes 2 transition to return back to your player.
    1 point
  8. It's the solution George gave on Discord, seems that there were some issues with 0.3.6 Nuget package.
    1 point
  9. Yes, that's the one i mean. You replaced the one located on the Nuget package's path, right? And after doing that, did you compile your gamemode?
    1 point
  10. If you're using 0.3.6 Nuget, make sure to copy the Bootstrapper from runtimes folder into the path where the Nuget package is installed.
    1 point
×
×
  • Create New...