Skull~Death Posted May 22, 2008 Share Posted May 22, 2008 1- How can i put a "sleep" on code? E.G: when a player dies, it respawns too fast, i want to delay it, any idea? 2- How can i send a Chat message JUST for someone? i think outputChatBox shows for everyone, doesn't it ? 3- Would custom sounds supported by MTA's Resource System? E.G: HEADSHOT, DOUBLEKILL, etc Link to comment
Skull~Death Posted May 22, 2008 Author Share Posted May 22, 2008 1- How can i put a "sleep" on code? E.G: when a player dies, it respawns too fast, i want to delay it, any idea? 2- How can i send a Chat message JUST for someone? i think outputChatBox shows for everyone, doesn't it ? 3- Would custom sounds supported by MTA's Resource System? E.G: HEADSHOT, DOUBLEKILL, etc Link to comment
eAi Posted May 22, 2008 Share Posted May 22, 2008 1: That depends, MTA does not respawn players, another resource must be doing so. The default spawnmanager can be configured by the gamemode to work as you wish, or you can code it manually using a timer. 2: Read the documentation for outputChatBox. You can use the visibleTo argument to specify who the text is shown to. E.g. outputChatBox ( "Hello " .. getPlayerNick(player), player ). See example 4. 3: No, not currently. We should be able to add that fairly soon though, it's reasonably likely it will be in DP4. Link to comment
eAi Posted May 22, 2008 Share Posted May 22, 2008 1: That depends, MTA does not respawn players, another resource must be doing so. The default spawnmanager can be configured by the gamemode to work as you wish, or you can code it manually using a timer. 2: Read the documentation for outputChatBox. You can use the visibleTo argument to specify who the text is shown to. E.g. outputChatBox ( "Hello " .. getPlayerNick(player), player ). See example 4. 3: No, not currently. We should be able to add that fairly soon though, it's reasonably likely it will be in DP4. Link to comment
Skull~Death Posted May 22, 2008 Author Share Posted May 22, 2008 Thanks a lot eAi Another questions: how do i make an array? e.g: for random spawn - how can i make the array and then randomize it ? Any idea? Link to comment
Skull~Death Posted May 22, 2008 Author Share Posted May 22, 2008 Thanks a lot eAi Another questions: how do i make an array? e.g: for random spawn - how can i make the array and then randomize it ? Any idea? Link to comment
Ace_Gambit Posted May 22, 2008 Share Posted May 22, 2008 Very basic example: spawnpoints = { {1, 1, 1}, {2, 2, 2}, {3, 3, 3} } spawnpoint = spawnpoints[math.random(1, #spawnpoints)] spawnPlayer(player, spawnpoint[1], spawnpoint[2], spawnpoint[3]) Link to comment
Ace_Gambit Posted May 22, 2008 Share Posted May 22, 2008 Very basic example: spawnpoints = { {1, 1, 1}, {2, 2, 2}, {3, 3, 3} } spawnpoint = spawnpoints[math.random(1, #spawnpoints)] spawnPlayer(player, spawnpoint[1], spawnpoint[2], spawnpoint[3]) Link to comment
eAi Posted May 22, 2008 Share Posted May 22, 2008 The convention with MTA, that you should follow ideally, is to store spawnpoints in map files. This allows mappers to modify the spawn points without editing code, using the map editor (once we finally release it!) This doesn't stop you randomly choosing spawnpoints though. The Spawnmanagerresource will do this for you and save you writing code for spawning players. Link to comment
eAi Posted May 22, 2008 Share Posted May 22, 2008 The convention with MTA, that you should follow ideally, is to store spawnpoints in map files. This allows mappers to modify the spawn points without editing code, using the map editor (once we finally release it!) This doesn't stop you randomly choosing spawnpoints though. The Spawnmanagerresource will do this for you and save you writing code for spawning players. Link to comment
Skull~Death Posted May 24, 2008 Author Share Posted May 24, 2008 Thanks Gambit, worked perfectly. More questions: I want to make a class selection screen, like the Interstate69 but with player models, how can do i this? I tryed everything but can't this working, so deleted everything and want to start from 0. 1- how do i change the camera to a certain place? 2- How do i load a model of a player model, as interstate69 does with vehicles? Link to comment
Skull~Death Posted May 24, 2008 Author Share Posted May 24, 2008 Thanks Gambit, worked perfectly. More questions: I want to make a class selection screen, like the Interstate69 but with player models, how can do i this? I tryed everything but can't this working, so deleted everything and want to start from 0. 1- how do i change the camera to a certain place? 2- How do i load a model of a player model, as interstate69 does with vehicles? Link to comment
50p Posted May 24, 2008 Share Posted May 24, 2008 1. There are camera functions: Server-side and Client-side 2. It depends what's your choice. You can load them from XML file or you can "hardcode" them in the resource. XML functions. Link to comment
50p Posted May 24, 2008 Share Posted May 24, 2008 1. There are camera functions: Server-side and Client-side 2. It depends what's your choice. You can load them from XML file or you can "hardcode" them in the resource. XML functions. Link to comment
Skull~Death Posted May 24, 2008 Author Share Posted May 24, 2008 2. It depends what's your choice. You can load them from XML file or you can "hardcode" them in the resource. XML functions. I didn't get what you mean. I mean't "load" of a custom model, i mean a player model (ped) to show to the client Ichecked Interstate69's guitest again, and noticed this: ivehicle = createVehicle (model, camX, camY + 11, camZ - 1, 0, 0, -220) any idea to a ped model ? Link to comment
Skull~Death Posted May 24, 2008 Author Share Posted May 24, 2008 2. It depends what's your choice. You can load them from XML file or you can "hardcode" them in the resource. XML functions. I didn't get what you mean. I mean't "load" of a custom model, i mean a player model (ped) to show to the client Ichecked Interstate69's guitest again, and noticed this: ivehicle = createVehicle (model, camX, camY + 11, camZ - 1, 0, 0, -220) any idea to a ped model ? Link to comment
eAi Posted May 24, 2008 Share Posted May 24, 2008 You can't in DP2, in DP3 you can, but thats not released yet. The standard way to do it in DP2 is to just use the local player, which works fine. Link to comment
eAi Posted May 24, 2008 Share Posted May 24, 2008 You can't in DP2, in DP3 you can, but thats not released yet. The standard way to do it in DP2 is to just use the local player, which works fine. 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