Jump to content

On downloading


TorNix~|nR

Recommended Posts

Posted

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?

76561198387870432.png

ZI ZOMBIE INFECTION: mtasa://5.196.7.163:22003

560x95_FFFFFF_FF9900_000000_000000.png

  • Moderators
Posted
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.

 

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

@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.

  • Haha 1

76561198387870432.png

ZI ZOMBIE INFECTION: mtasa://5.196.7.163:22003

560x95_FFFFFF_FF9900_000000_000000.png

  • Moderators
Posted

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

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted (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 by Khadeer143
  • Haha 1
  • Confused 1

Visit https://storm-hosting.xyz/ for free game servers !
 

Posted

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

Visit https://storm-hosting.xyz/ for free game servers !
 

  • Moderators
Posted
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)

 

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...