Function call only allows arrays as parameters
MegaThorx opened this issue · 3 comments
MegaThorx commented
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])
qaisjp commented
Are you sure? https://wiki.php.net/rfc/argument_unpacking#proposal
MegaThorx commented
ecastro98 commented
The PR was merged. Thanks!
