Help with death pickup
#1

Hello. How to create pickup after player death in that position, where player died? I know how to get players position, but whats next? I need to create pickups after every death. Also I need, that when other player enter that pickup, he get money or just text and that pickup destroy.
Reply
#2

any help?
Reply
#3

I will write an example which has to be optimized, I hope you will do that.
PHP код:
new DeathPickup[MAX_PLAYERS];
public 
OnPlayerDeath(playerid)
{
    new 
Float:x,Float:y,Float:z;
    
GetPlayerPos(playeridxyz);
    
DeathPickup[playerid] = CreatePickup(modeltypexyzvirtualworld);
    return 
1;
}
public 
OnPlayerPickUpPickup(playeridpickupid)
{
    for(new 
0<= MAX_PLAYERSi++)
    {
        if(
pickupid DeathPickup[i]) {
            
SendClientMessage(playerid, -1"You have just entered in pickup where someone died !");
            
GivePlayerMoney(playerid80);
            
GameTextForPlayer(playerid"80$+"10002);
            
DestroyPickup(DeathPickup[i]);
        }
    }
    return 
1;

I will be gratefull if you + my reputation (in case if I helped you).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)