I cannot figure out how to add commands in the correct way.
I type
/rewards add command "sedan" "spawn sedan" 5
/rewards add command "mc" "spawn minicopter" 5
/rewards add command "rowboat" "spawn rowboat" 5
These seem to add fine in the rewards_data.json
Rcon outputs the player called the command, however the coordinates seem to spawn the vehicle at "0.0 0.0 0.0"
Any idea what i am doing wrong?
---------------
Also "iconName": "sedan", --I have a sedan.png located in /oxide/data/ServerRewards/Images
The image will not load.
I have tried adding a url here to see and it will not load this either.
Everything else is working fine.
Merged post
Update, got my custom images to load, turns out when i added the /oxide/data/ServerRewards/Images, i forgot to add permissions to the folder (linux for the win)
However my spawn commands still are not working correctly.
Merged post
Ok final update, please change to solved.
Upon studying the code i have come across the correct way to add the custom parameters for spawning cars and such. The documentation page was incorrect.
In reward.data.json
The command should be written "spawn sedan $player.x,player.y,player.z"
No spaces, back slashes or seperation of the parameters whatsoever.
I type
/rewards add command "sedan" "spawn sedan" 5
/rewards add command "mc" "spawn minicopter" 5
/rewards add command "rowboat" "spawn rowboat" 5
These seem to add fine in the rewards_data.json
"commands": {
"Day": {
"description": "Spawn yourself a Car",
"iconName": "sedan",
"commands": [
"spawn sedan"
],Rcon outputs the player called the command, however the coordinates seem to spawn the vehicle at "0.0 0.0 0.0"
Any idea what i am doing wrong?
---------------
Also "iconName": "sedan", --I have a sedan.png located in /oxide/data/ServerRewards/Images
The image will not load.
I have tried adding a url here to see and it will not load this either.
Everything else is working fine.
Merged post
Update, got my custom images to load, turns out when i added the /oxide/data/ServerRewards/Images, i forgot to add permissions to the folder (linux for the win)
However my spawn commands still are not working correctly.
Unloaded plugin ServerRewards v0.4.67 by k1lly0u
[ServerRewards] All UI elements have been successfully generated!
Loaded plugin ServerRewards v0.4.67 by k1lly0u
spawned sedantest.entity[9971391] at (0.0, 0.0, 0.0)Merged post
Ok final update, please change to solved.
Upon studying the code i have come across the correct way to add the custom parameters for spawning cars and such. The documentation page was incorrect.
In reward.data.json
The command should be written "spawn sedan $player.x,player.y,player.z"
No spaces, back slashes or seperation of the parameters whatsoever.