获取本地玩家不要使用GetPlayerPed(-1),而是PlayerPedId()。
如果服务器正在使用ox_lib等库,可以直接使用缓存;减小性能开销,而不是每次都获取。
Documentation for Overextended's resources for FiveM/RedM
overextended.dev
最后一个end缺少一个“)”,注意代码缩进,提高代码可读性。
另外,你需要明白PlayerPed、PlayerIndex、PlayerServerId的区别。
docs.fivem.net
Returns vehicle's wheels' width (width is the same for all the wheels, cannot get/set specific wheel of vehicle). Only works on non-default wheels (returns 0 in case of default wheels).
docs.fivem.net