Search the Community
Showing results for tags 'WiredPlayers'.
Found 1 result
-
Hello, scripters! 😀 I'm new to the RAGE scene and recently started scripting my own gamemode. I'm using WiredPlayers gamemode as an example, but i have some strange issues. So far i succeeded creating VS solution, connecting it with MySQL database and player authentication system. But i have one problem with recreating the lobby system: I can't set the player position when they are logging in, but strangely enough i can change other player-related properties like skin. Here is my code: [ServerEvent(Event.PlayerConnected)] public void OnPlayerConnected(Client player) { NAPI.Player.SetPlayerSkin(player, PedHash.Stripper01SFY); // WORKS PERFECTLY player.Transparency = 255; InitializePlayerData(player); // CALLING THE INITIALIZEPLAYERDATA FUNCTION //Other stuff for logging the user } private void InitializePlayerData(Client player) { player.Position = new Vector3(152.26, -1004.47, -99.00); //DOESN'T TELEPORT THE PLAYER AT THIS POSITION player.Dimension = Convert.ToUInt32(player.Value); player.Health = 100; } But when i finish logging in and i use the command /goto, it teleports me to that destination. [Command("goto", "~y~USAGE: ~w~/goto")] public void CMD_Goto(Client player) { player.Position = new Vector3(152.26, -1004.47, -98.00); } Is there something i'm missing in order for this to work ??
- 2 replies
-
- WiredPlayers
- CSharp
-
(and 1 more)
Tagged with:
