14.07.2016, 09:21
No, not really. When you use SetPlayerCameraLookAt it actually disconnects the camera from the player. One thing you could do is increase the player's "drunk level" for a short time after shooting for a long time which would shift the camera angle without disconnecting it. You have less control over where it's moving this way but it's better than nothing!
Example:
Quick code:
I'm not entirely sure this affects the spread, it's purely a camera effect. If you were shooting a stationary target, your accuracy wouldn't change. Generally, shooting full auto is a terrible idea anyway though.
Example:
Quick code:
pawn Код:
#include <a_samp>
static PlayerAimPunch[MAX_PLAYERS] = {0, ...};
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(PlayerAimPunch[playerid] == 0)
PlayerAimPunch[playerid] = 1000;
SetPlayerDrunkLevel(playerid, PlayerAimPunch[playerid]);
PlayerAimPunch[playerid] += 100;
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(!(oldkeys & KEY_FIRE))
{
SetPlayerDrunkLevel(playerid, 0);
PlayerAimPunch[playerid] = 0;
}
return 1;
}