Posts: 220
Threads: 89
Joined: May 2012
Reputation:
0
Hello I made a system that drops items when you die. However I want it to drop items around your position, like within a range of 5.0. I am just not sure how I would accomplish this.
Posts: 1,208
Threads: 36
Joined: Apr 2015
If you want generate random points in range use:
PHP код:
GetRandomPointInCircle(Float:x,Float:y,Float:radius,&Float:tx,&Float:ty);
3DTryg.inc:
https://sampforum.blast.hk/showthread.php?tid=591010
Posts: 851
Threads: 33
Joined: Jul 2016
Reputation:
0
I totally agree with Pottus's point.. Why don't you create an object on the ground like a backpack or something.. and if IsPlayerInRangeOfPoint (this backpack) and uses a command like /pickup or something, give him what's in that dead player inventory, easy..
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by Eoussama
Can you? I'm interested, I'd appreciate if you'd demonstrate how is it possible, cuz I honestly have no idea!
|
MapAndreas is one option in this... Check for the point where the player is, compare the height to the random point given, and if found to be higher or odd from where they died.
Not just 0.9 higher, like 5 or more higher.
Then the random point would just need to find another point if it ends up being an invalid point.
That's just a random idea though, Pottus may have a better plan on this.