Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: zooc 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 ;)
-
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.
-
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
-
function SpawnObject(X,Y:Single; ObjType: Byte): integer;
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...
function GetPlayerStat(ID: byte; Stat: string): Variant
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
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
-
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 ;)
-
overlap*?
oh whatever.. make it a procedure and rename it :P
-
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.
-
So if it's different (though not much different) why remove it?
-
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.
-
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?
-
Whoever has the lowest ID.
-
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 ;)
-
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 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.
-
so you could fix it up a little sweety
-
GiveBonus has been in soldatserver since 2.6.0 (I believe). Now, at 2.6.2, it is mentioned in the changelog:
- 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?
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.