Help me!
#1

Hey guy.

I made a money drop.

So if a player dies it will drup 5 cash pickups and each pickup will give the player 100$ cash.

My problem: The player walks in the pickups and they will be gone. If the player respawns the pickups will appear again.

How to fix that the pickups will stay gone after a player picked it up?

Codes:
PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == cash)
    {
        
GivePlayerMoney(playerid,100);
    }
    else if(
pickupid == cash2)
    {
        
GivePlayerMoney(playerid,100);
    }
    else if(
pickupid == cash3)
    {
        
GivePlayerMoney(playerid,100);
    }
    else if(
pickupid == cash4)
    {
        
GivePlayerMoney(playerid,100);
    }
    else if(
pickupid == cash5)
    {
        
GivePlayerMoney(playerid,100);
    }
    return 
1;

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
Float:x,Float:y,Float:z;
    
ResetPlayerMoney(playerid);
      
GetPlayerPos(playerid,x,y,z);
    
cash CreatePickup(1212,8,x,y,z);
    
cash2 CreatePickup(1212,8,x+1,y,z);
    
cash3 CreatePickup(1212,8,x-1,y,z);
    
cash4 CreatePickup(1212,8,x,y+1,z);
    
cash5 CreatePickup(1212,8,x,y-1,z);

Please help me
Reply


Messages In This Thread
Help me! - by Fantje - 23.07.2016, 21:15
Re: Help me! - by Fantje - 23.07.2016, 22:02
Re: Help me! - by Rockefeller - 23.07.2016, 23:05
Re: Help me! - by Fantje - 23.07.2016, 23:25
Re: Help me! - by Dayrion - 24.07.2016, 03:41

Forum Jump:


Users browsing this thread: 1 Guest(s)