Hello,
I've got a small problem with editing the incoming BulletSync.
Does anybody know how to fix this?
This is my Code:
And this Error occurs once a player shoots:
I've got a small problem with editing the incoming BulletSync.
Does anybody know how to fix this?
This is my Code:
Lua:
function sampev.onBulletSync(playerId, data)
bool, handle = sampGetCharHandleBySampPlayerId(playerId)
X, Y, Z = getCharCoordinates(handle)
data.target.x = X
data.target.y = Y
data.target.z = Z
print('playerId: ['..playerId..'] X: ['..data.target.x..'] Y: ['..data.target.y..'] Z: ['..data.target.z..']')
return {playerId, data}
end
And this Error occurs once a player shoots:
Код:
playground.lua: G:\GTA San Andreas\moonloader\lib\samp\events\utils.lua:43: cannot convert 'struct BulletSyncData' to 'int'
stack traceback:
[C]: in function 'cast'
G:\GTA San Andreas\moonloader\lib\samp\events\utils.lua:43: in function 'write_sync_data'
...A San Andreas\moonloader\lib\samp\events\extra_types.lua:58: in function 'write'
G:\GTA San Andreas\moonloader\lib\samp\events\core.lua:45: in function 'write_data'
G:\GTA San Andreas\moonloader\lib\samp\events\core.lua:92: in function <G:\GTA San Andreas\moonloader\lib\samp\events\core.lua:54>