.silent
Well-known member
- Joined
- Apr 14, 2013
- Messages
- 339
- Reaction score
- 13
Hi !
Im creating my second sa-mp trainer, with much more functions.
I want to add a weapon spawn, just like in s0beit.The problem is that i dont even have the VC++ IDE and i dont even have the s0beit source.How is s0b spawning the weapons for player ? Is it using just memory addresses ?
I found this on the addresses site:
But i have no idea how to use it to spawn a weapon.
(I dont want any code, just a explanation for doing this like, you have to write this to this address etc)
Im creating my second sa-mp trainer, with much more functions.
I want to add a weapon spawn, just like in s0beit.The problem is that i dont even have the VC++ IDE and i dont even have the s0beit source.How is s0b spawning the weapons for player ? Is it using just memory addresses ?
I found this on the addresses site:
Code:
WeaponSlot // Total 28Bytes
DWORD type // + 0
DWORD state // + 4 (0 idle, 1 firing, 2 reloading)
DWORD AmmoInClip // + 8
DWORD AmmoRemaining // +12
FLOAT unknown // +16 (increases each time you fire your weapon, 0 when weapon not active,
probably used to count bullets fired to know when to reload?)
UNKNOWN 0..7 Bytes // +20 (unknown - goggle mode, 0 off and 256 on)...+27
WeaponSlot.type
(Slot0: No Weapon) (Slot2: Handguns)
0 - Fist 22 - Pistol
1 - Brass Knuckles 23 - Silenced Pistol
(Slot1: Melee) 24 - Desert Eagle
2 - Golf Club (Slot3: Shotguns)
3 - Nitestick 25 - Shotgun
4 - Knife 26 - Sawn-Off Shotgun
5 - Baseball Bat 27 - SPAS-12
6 - Shovel (Slot4: Sub-Machineguns)
7 - Pool Cue 28 - Micro Uzi
8 - Katana 29 - MP5
9 - Chainsaw 32 - TEC-9
15 - Cane
(Slot5: Machineguns) (Slot10: Gifts)
30 - AK47 14 - Flowers
31 - M4 (Slot9:Special1)
(Slot6: Rifles) 42 - Fire Extinguisher
33 - Country Rifle 43 - Camera
34 - Sniper Rifle (Slot11:Special2)
(Slot7: Heavy Weapons) 44 - NV Goggles
35 - Rocket Launcher 45 - IR Goggles
36 - Heat Seaking RPG 46 - Parachute
37 - Flame Thrower (Slot12:Detonators)
38 - Minigun 40 - Detonator(for remote explosives)
(Slot8: Projectiles)
16 - Grenade
18 - Molotov Cocktail
39 - Remote Explosives
(No slot: Fired from hunter / hydra / missile launcher)
(This type is stored in the rocket pool as rocket type, but is the continuation of this list)
19 - Normal rockets
20 - Heatseeking rockets
58 - Flares
(I dont want any code, just a explanation for doing this like, you have to write this to this address etc)