Jump to content

Few questions


Recommended Posts

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

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

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

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

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

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

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

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

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