Quote:
I have found trying to quickly change a players weapon, and drop their current weapon (with client_cmd drop) to be too inefficient when dealing with players with a high latency.
|
Look for
engclient_cmd. When using
client_cmd command is firstly sent to client, then client send it to engine and as you saw it can be delayed.
engclient_cmd emulate the command and send it directly to the server. Since command is never sent to client there is no delay. As a note, if you send a command with
engclient_cmd it won't be received by plugins and/or modules(a common case is when a plugin is trying to hook drop command it does
register_clcmd("drop", ...)).
If you want this kind of hooking, for amxx 1.8.3 dev use
amxclient_cmd. For 1.8.2 you have no way around
englient_cmd, unfortunately.
Quote:
These two implementations appear to strip my weapon, but do not update my hud, I can also not attack or pick up weapons after I use these function:
fm_strip_user_weapons(id)
strip_user_weapons(id)
|
For your information, most of fakemeta_util functions are simply conversions from already existing modules. They are slower because of being implementated in a plugin and not in a module, and should not be used. Also
fm_strip_user_weapons does not even reset the user weapon.
To update the hud you can use
user_has_weapon and set the 3rd param to 0(this means weapon will be removed from player's weapon list, which fix the hud). It has the same behaviour as doing
pev_weapons & ~ (1 << weaponid).
About shooting and weapon pickup something inside dll is not reset properly, but since I know nothing about TS I can't say for sure. Can you upload the linux mod dll in your next post so I can check?
__________________