Author Topic: another undocumented thingie  (Read 1707 times)

0 Members and 1 Guest are viewing this topic.

Offline zooc

  • Major(1)
  • Posts: 12
another undocumented thingie
« on: May 01, 2007, 05:38:48 am »
GiveBonus(ID,bonus_id:byte);

bonus_id can be set to:
1 - predator;
2 - berserker;
3 - bulletproof vest, will disappear after few seconds(?)

go play with it ;)

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: another undocumented thingie
« Reply #1 on: May 01, 2007, 05:41:12 am »
Another thing that wont be in the next version.

These "undocumented" functions are only there because I did not get a chance to remove them before MM released 2.6.0, so don't get your hopes up.

Also, get lost cooz. You were banned for a reason.

Offline zooc

  • Major(1)
  • Posts: 12
Re: another undocumented thingie
« Reply #2 on: May 01, 2007, 01:42:47 pm »
yeah right, banned for 'free gay porn' haha
you can say get lost to your sister or whatever, stop making offtopics pal


and what a cheap excuse, i hope you'll remove those functions from your phun servers too, grow up little boy

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: another undocumented thingie
« Reply #3 on: May 01, 2007, 03:31:09 pm »
Quote
function SpawnObject(X,Y:Single; ObjType: Byte): integer;
Quote
ObjType List:
    1        Desert Eagle
    2        HK MP5
    3        AK 74
    4        Steyr AUG
    5        Spas 12
    6        Ruger77
    7        M79
    8        Barrett M82A1
    9        Minimi
    10      Minigun
    11      USSOCOM
    12      Combat Knife
    13      Chainsaw
    14      LAW
    15      Stationary Gun
    16      Medical Kit
    17      Grenade Kit
    18      Flamer Kit
    19      Vest Kit
    20      Predator Kit
    21      Berserk Kit
    22      Cluster Kit

along with...

Quote
function GetPlayerStat(ID: byte; Stat: string): Variant
Quote
Stat            Result              Type
Kills            Player Kills        Integer
Deaths        Player Deaths     Integer
Ping            Player Ping         Integer
Team          Player Team       Byte
Active         Player Ingame?   Boolean
IP               Player IP            String
Name         Player Name      String
Alive           Player Dead?     Boolean
Health         Player Health      Integer
Primary       Pri Weapon        Byte
Secondary  Sec Weapon       Byte
Ammo        Primary Ammo    Byte
Jets             Jet Amount         Integer
Grenades    Grenade Count   Byte
X                Player X             Single
Y                 Player Y            Single
Flagger        Has flag?            Boolean
Time            Time in server     Integer


if you want your own fucntion... ill write it out for ya

Quote
function GiveBonus(ID,bonus_id:byte);
begin
  if bonus_id = 1 then SpawnObject(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),20);
  if bonus_id = 2 then SpawnObject(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),21);
  if bonus_id = 3 then SpawnObject(GetPlayerStat(ID,'X'),GetPlayerStat(ID,'Y'),19);
end;
i didn't test but should work

it does as you said.. add to top

Offline zooc

  • Major(1)
  • Posts: 12
Re: another undocumented thingie
« Reply #4 on: May 01, 2007, 04:12:13 pm »
no no DorkeyDear, you got it all wrong
your code won't work cause there's already GiveBonus() there and you can't overload it in silly Enesce's scripting lang and also it's procedure not function ;)

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: another undocumented thingie
« Reply #5 on: May 01, 2007, 04:29:02 pm »
overlap*?

oh whatever.. make it a procedure and rename it :P

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: another undocumented thingie
« Reply #6 on: May 01, 2007, 07:50:21 pm »
Its called overload in the programming world. and GiveBonus differs to SpawnObject because GiveBonus gives it directly to the player instead of dropping a pack.

Offline Aquarius

  • Soldier
  • **
  • Posts: 234
Re: another undocumented thingie
« Reply #7 on: May 02, 2007, 02:06:37 am »
So if it's different (though not much different) why remove it?

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: another undocumented thingie
« Reply #8 on: May 02, 2007, 02:10:44 am »
Because it is pointless, and it was only there when I was trying to allow players to be predator for a long time. Which cant be done, so I am removing it.

Offline Aquarius

  • Soldier
  • **
  • Posts: 234
Re: another undocumented thingie
« Reply #9 on: May 02, 2007, 02:18:43 am »
If you want to give predator to a specific player and 2 players are standing in the same place (+/- 3 pixels)  who will get it?


Offline Aquarius

  • Soldier
  • **
  • Posts: 234
Re: another undocumented thingie
« Reply #11 on: May 02, 2007, 02:22:04 am »
Yeah. So that's not so pointless. Unless you check player positions, and move a player if it's to close and has lower ID... wait, you want to remove MovePlayer function too ;)

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: another undocumented thingie
« Reply #12 on: May 02, 2007, 05:24:21 am »
Because it is pointless

definitly not, it's just as nice as MovePlayer, since this will DEFINITLY give the bonus to the player, i'm having real issues with SpawnObject. greedy enesce ;p
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: another undocumented thingie
« Reply #13 on: May 02, 2007, 05:58:23 am »
I might leave it in, but I will not document it or support it... Somewhere along the line it will bugger up things in the server because the ObjectID sent to the client is 1, which is a flag.

Offline zooc

  • Major(1)
  • Posts: 12
Re: another undocumented thingie
« Reply #14 on: May 02, 2007, 06:28:56 am »
so you could fix it up a little sweety

Offline deguix

  • Major
  • *
  • Posts: 79
Re: another undocumented thingie
« Reply #15 on: August 12, 2007, 09:13:48 am »
GiveBonus has been in soldatserver since 2.6.0 (I believe). Now, at 2.6.2, it is mentioned in the changelog:

Quote
- Fixed alot of bugs with GiveBonus (Bonuses are now recognized server-side aswell)

Even though many bugs were fixed for that, it's still not documentated. Is this below still true?

Quote
Somewhere along the line it will bugger up things in the server because the ObjectID sent to the client is 1, which is a flag.