Stefan Todorovski Posted November 24, 2018 Share Posted November 24, 2018 (edited) 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 ?? Edited November 24, 2018 by Stefan Todorovski Link to comment Share on other sites More sharing options...
WeirdestYeti Posted November 24, 2018 Share Posted November 24, 2018 Last method - https://wiki.gtanet.work/index.php?title=OnPlayerConnected 1 Link to comment Share on other sites More sharing options...
Stefan Todorovski Posted November 24, 2018 Author Share Posted November 24, 2018 15 minutes ago, WeirdestYeti said: Last method - https://wiki.gtanet.work/index.php?title=OnPlayerConnected Thank you so much! it worked. I haven't seen anything similar in the WiredPlayers gamemode. I'm really confused how he pulled it off without using any of those two methods. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now