You can get the player from his name OR steam id OR fivem id then do whatever you want to him. Little example related to the example in the tutorial: -- in tebex testingCommand {purchaserName} -- in server side function testing(_, arg) local name = arg[1] local player = getPlayerFromName(name) -- you have your player and you can do whatever action to him... -- your code ! end RegisterCommand(“testingCommand”, testing, true) funciton getPlayerFromName(name) for _, player in ipairs(GetPlayers()) do if (GetPlayerName(player) == name) then return player end end return false endJust note that I haven’t tested this and it is just a pure example, I normally use the {hexid} to get the player’s steam id and give them rewards so not sure about the {purchaserName}. (责任编辑:) |