It took me some time messing around but i was able to get it where you can spawn a locked crate on a player. Here is my issue. The $player.id and $player.name strings are not working on spawn commands. You can get spawn commands to work with the $player.x,$player.y,$player.z string, however it spawns it directly on your position. So if you do buy the command you end up stuck inside the locked crate until you get it and clear its inventory.
"commands": {
"crate": {
"description": "Spawns a locked crate on your position",
"iconName": null,
"commands": [
"spawn codelockedhackablecrate $player.x,$player.y,$player.z"
],
"displayName": "Spawn a locked crate",
"cost": 50,
"cooldown": 0
If you try to use the other strings itll perform the command, but they will be spawned at 0,0,0 and since thats not an area you can get to its a waste of money. Does anyone know a workaround for this issue. Like maybe setting it to spawn it at a certain location on the map. Like use the grid coordinates of the junkyard and make one spawn there.
"commands": {
"crate": {
"description": "Spawns a locked crate on your position",
"iconName": null,
"commands": [
"spawn codelockedhackablecrate $player.x,$player.y,$player.z"
],
"displayName": "Spawn a locked crate",
"cost": 50,
"cooldown": 0
If you try to use the other strings itll perform the command, but they will be spawned at 0,0,0 and since thats not an area you can get to its a waste of money. Does anyone know a workaround for this issue. Like maybe setting it to spawn it at a certain location on the map. Like use the grid coordinates of the junkyard and make one spawn there.