Closed ArranTuna closed 6 years ago
“Elements of the Vector or Matrix classes cannot be passed!”, read it on the wiki please.
i have idea how this could be resolved. custom classes could contain special method that pack every data, send, then unpack by other method ( triggers automaticly will detect this method, call them and unpack in other side )
Duplicate of #374
Describe the bug When triggerserverevent has oop argument such as Vector or Matrix then triggerServerEvent doesn't run and don't send any error.
To Reproduce Example: pos = localPlayer:getPosition() (Or Vector3(getElementPosition(localPlayer)) triggerServerEvent("Player->Spawn", localPlayer, localPlayer, pos) No error, no run. When i change the pos argument in triggerServerEvent to x,y,z the TriggerServerEvent works.
Example: triggerServerEvent("Player->Spawn", localPlayer, localPlayer, pos.x, pos.y, pos.z)
Executing client-side command: pos = localPlayer:getPosition() Executing client-side command: triggerServerEvent("Player->Spawn", localPlayer, localPlayer, pos) Command results: false [boolean]
Expected behavior For event to actually trigger.
Screenshots unstated
MTA Client (please complete the following information): unstated
MTA Server (please complete the following information): unstated
Additional context
AlexTMjugador: As a workaround, you can use the example in this Wiki page to transfer vectors safely in triggerServer/ClientEvent: https://wiki.multitheftauto.com/wiki/GetUserdataType#Example
https://bugs.mtasa.com/view.php?id=9791