You have to create a formula that allows the randomized number to be negative. I did something similar, like this:
(For this example, lets say our pixel range we're trying to spawn within is 50.)
Spawn Object at ((player.X + (int(random(100))) - 50), ((player.Y + (int(random(100))) - 50)
Since the random number will be between 0 and 100, when it subtracts 50 it gives us a value between -50 and 50. Hope this helps!