[CCSPlayer::CSWeaponDrop]
shortname = "DropWeapon"
sig = " 55 8B EC 81 EC 2A 2A 2A 2A 53 56 8B 75 08 32 DB 57"
symbol = _ZN9CCSPlayer12CSWeaponDropEP17CBaseCombatWeaponbb
module = csgo/bin/server
arguments = ppbb
return_type = i
convention = thiscall
what arguments do i need to pass ? :/
A second question i have is, would it be possible to do some kinda code so players do not try to pick up guns instead of making them drop them on item_pickup ?
dyncall question
dyncall question
-Tuck
In order to stop players from picking weapons up, we need Dynamic Function "Hooking", which is not implemented, yet.
The arguments you need to pass are just like in this example:
http://www.sourcepython.com/showthread.php?205-Stripping-weapons&p=980&viewfull=1#post980
Using a PlayerEntity (or BaseEntity) instance, will automatically push the entity's own pointer in the proper position. Notice in your ../addons/source-python/_libs/_data/functions/player/csgo.ini:We set the PlayerEntity "drop_weapon" method to utilize the SignatureDictionary item "DropWeapon". And the entity's pointer, since it is set to the index of 0, will be the first object pushed.
So, first it pushes the player's pointer, then it pushes the specific weapon's pointer, then it pushes a bool value (not sure what the first bool is for), last it pushes a bool value for whether or not to "throw" the weapon (True being that it should be thrown, False that it should be simply dropped). If you use PlayerEntity, you will only need to pass the weapon's pointer and the 2 bool values. If you use SignatureDictionary or Binutils directly, you will need to pass/push the player's pointer first.
Satoon
The arguments you need to pass are just like in this example:
http://www.sourcepython.com/showthread.php?205-Stripping-weapons&p=980&viewfull=1#post980
Using a PlayerEntity (or BaseEntity) instance, will automatically push the entity's own pointer in the proper position. Notice in your ../addons/source-python/_libs/_data/functions/player/csgo.ini:
Code: Select all
[drop_weapon]
name = "DropWeapon"
pointer = 0
So, first it pushes the player's pointer, then it pushes the specific weapon's pointer, then it pushes a bool value (not sure what the first bool is for), last it pushes a bool value for whether or not to "throw" the weapon (True being that it should be thrown, False that it should be simply dropped). If you use PlayerEntity, you will only need to pass the weapon's pointer and the 2 bool values. If you use SignatureDictionary or Binutils directly, you will need to pass/push the player's pointer first.
Satoon
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 80 guests