mode: more ammo

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
zombare
Posts: 10
Joined: 07 Apr 2013, 11:21

mode: more ammo

Post by zombare »

can somebody help me, how to add more ammos into mode?
in normal there are often 4 ammos until load. how to increase this amount?
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: mode: more ammo

Post by Eole »

When spawning a player you can use the SetPlayerAmmoMax() function to set the number of ammo for each weapon:

Code: Select all

SetPlayerAmmoMax(CSmPlayer Player, EWeapon Weapon, Integer Count)
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
zombare
Posts: 10
Joined: 07 Apr 2013, 11:21

Re: mode: more ammo

Post by zombare »

thank you!
im very bad at editing modes is it like this to add 2 more ammos to rocket?

Code: Select all

SetPlayerAmmoMax(CSmPlayer Player, EWeapon Rocket, Integer 6)
User avatar
faserg1
Posts: 446
Joined: 06 Jul 2011, 19:54
Location: Russia
Contact:

Re: mode: more ammo

Post by faserg1 »

zombare wrote:thank you!
im very bad at editing modes is it like this to add 2 more ammos to rocket?

Code: Select all

SetPlayerAmmoMax(CSmPlayer Player, EWeapon Rocket, Integer 6)
Please, read the ManiaScript Syntax documentation ;)
As I know, that must be smth like this:

Code: Select all

SetPlayerAmmoMax(Player, EWeapon::Rocket, 6);
Also, there is an all system things (functions, classes, etc):
http://maniascript.tmrankings.com/html/index.html
Есть вопросы? Только скайп - faserg1.
Image
Жизнь - это динамика ритма. Life is dynamic of rhythm.
User avatar
Eole
Nadeo
Nadeo
Posts: 1265
Joined: 26 Apr 2011, 21:08

Re: mode: more ammo

Post by Eole »

The exact lines to paste before the player spawn are:

Code: Select all

// Set 6 ammo max to all weapons
SetPlayerAmmoMax(Player, CSmMode::EWeapon::Rocket, 6);
SetPlayerAmmoMax(Player, CSmMode::EWeapon::Laser, 6);
SetPlayerAmmoMax(Player, CSmMode::EWeapon::Nucleus, 6);
SetPlayerAmmoMax(Player, CSmMode::EWeapon::Arrow, 6);
Contribute to the ManiaPlanet documentation on GitHub
A question about ManiaScript? Ask it here!
zombare
Posts: 10
Joined: 07 Apr 2013, 11:21

Re: mode: more ammo

Post by zombare »

thank you very much!
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest