Random position around player
#1

Hi, how is it possible to get random positions around player? I want the player to drop his weapons around him when he dies and I don't want the weapons to lay on each other.

EDIT: I'm stupid, I just found this: https://sampforum.blast.hk/showthread.php?tid=269857
Reply
#2

PHP код:
new 
    
Floatx,
    
Floaty,
    
Floatz
;
GetPlayerPosplayeridxy);
CreatePickup( .., ..., ( + ( random) - ) ), ( + ( random) - ) ), z,  ... ); 
I usually do it like that, it may sound complicated (it is not), but that's the best method I've tried so far.
Reply
#3

Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
PHP код:
new 
    
Floatx,
    
Floaty,
    
Floatz
;
GetPlayerPosplayeridxy);
CreatePickup( .., ..., ( + ( random) - ) ), ( + ( random) - ) ), z,  ... ); 
I usually do it like that, it may sound complicated (it is not), but that's the best method I've tried so far.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)