To create the tent, use the camcreate command. I don't know what the name OFP uses for a tent, but you can find out by saving a map with only a tent placed. Open up the mission.sqm file, and find where it says "vehicle = XXX". That name is the name of the tent. To create one, you simply say:
"XXX" camcreate getpos player
Or some other location. You could also pre-place a tent, and use the "setpos" command to move it next to the player, then setpos it somewhere in the ocean when it is done.
When adding actions, you need to use a variable to keep track of how many actions you have added. Increase this after each action you add. Then you use this number when you remove the action.