TorNix~|nR Posted October 31, 2017 Share Posted October 31, 2017 Hello guys, I'm thinking those days of something, while the player is downloading files he spawns on a place, to play like a minigame (a little base to play on), when he died, he respawns there. any help? Link to comment
Moderators IIYAMA Posted October 31, 2017 Moderators Share Posted October 31, 2017 addEventHandler("onPlayerJoin", root, function () -- he joins the server end) addEventHandler("onPlayerWasted", root, function () -- So sorry, please die again end) https://wiki.multitheftauto.com/wiki/SpawnPlayer @TorNix~|nR time to make your first attempt. Link to comment
ShayF2 Posted October 31, 2017 Share Posted October 31, 2017 Use source, source is the player... Link to comment
TorNix~|nR Posted October 31, 2017 Author Share Posted October 31, 2017 @IIYAMA, I already make so many xD, I will make it, and if there some bugs I'll notice but I want when the player downloading and when it finish I use triggerEvent onClientDownloadFinish when the player finish .downloading it backs to normal hospital system, the example you gave me is for all time. 1 Link to comment
Moderators IIYAMA Posted October 31, 2017 Moderators Share Posted October 31, 2017 You should have asked that question in your main post lol. Please take a look at the example of this function, it just what you need: https://wiki.multitheftauto.com/wiki/IsTransferBoxActive Link to comment
Storm-Hanma Posted November 1, 2017 Share Posted November 1, 2017 (edited) @IIYAMA what about a spawn when we add add command handler ? I did it with my new map katana I added the spawn ,too and respawn too but problem is when play die in katana arena player body seems for a sec in katana map and then again he spawn at default play mode spawns ?when I stop play it again respawn at katana arena can u tell me how to fix this ? Edited November 1, 2017 by Khadeer143 1 1 Link to comment
Storm-Hanma Posted November 1, 2017 Share Posted November 1, 2017 sorry for my bad english dont laugh pls !!! the thing is i created a katana arena map i added functions using command handle /katana so player will teleport on katana arena the problem is when player die he must spawn in katana arena but it spawn to default random spawns of free roam how can i fix this? @IIYAMA Link to comment
Moderators IIYAMA Posted November 1, 2017 Moderators Share Posted November 1, 2017 if getElementData(player, "content-downloaded") then -- spawn in freeroam end if not getElementData(player, "content-downloaded") then -- spawn in katana land end -- finish downloading setElementData(player, "content-downloaded", true, false) Link to comment
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