multitheftauto/mtasa-php-sdk

Function call only allows arrays as parameters

MegaThorx opened this issue · 3 comments

https://github.com/multitheftauto/mtasa-php-sdk/blob/master/src/Model/Resource.php#L60

The array prevents that you just pass numbers or strings as a parameter.

$this->mta->getResource('vrp')->call('phpSDKKickPlayer', $adminId, $targetId, $reason)

For now I need to wrap all the parameters into an array and unpack it in the script.

$this->mta->getResource('vrp')->call('phpSDKKickPlayer', ['adminId' => $adminId, 'targetId' => $targetId, 'reason' => $reason])

image

array ...$arguments forces that every parameter must be from type array. If I change the line to ...$arguments then it works.

The PR was merged. Thanks!