0 Members and 1 Guest are viewing this topic.
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
function GetPlayerStat(ID: byte; Stat: string): Variant
Stat Result TypeKills Player Kills IntegerDeaths Player Deaths IntegerPing Player Ping IntegerTeam Player Team ByteActive Player Ingame? BooleanIP Player IP StringName Player Name StringAlive Player Dead? BooleanHealth Player Health IntegerPrimary Pri Weapon ByteSecondary Sec Weapon ByteAmmo Primary Ammo ByteJets Jet Amount IntegerGrenades Grenade Count ByteX Player X SingleY Player Y SingleFlagger Has flag? BooleanTime Time in server Integer
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;
Because it is pointless
- Fixed alot of bugs with GiveBonus (Bonuses are now recognized server-side aswell)
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.