Money Drop all the player money?
#2

Try this:
forward DestroyPickup();//at the top of your script
new pick3;//at the top of your script
new pickuptimer;//at the top of your script
new DropMoney;//at the top of your script



DropMoney = GetPlayerMoney(playerid);//in "public OnPlayerDeath(playerid, killerid, reason)"
pickuptimer = SetTimerEx("DestroyPickup",1000, 0, "i");//in "public OnPlayerDeath(playerid, killerid, reason)"
pick3 = CreatePickup(1550,3,x,y-0.5,z);//in "public OnPlayerDeath(playerid, killerid, reason)"


pawn Код:
public DestroyPickup()
{
    DestroyPickup(pick3);
}
 
public OnPlayerPickUpPickup( playerid, pickupid )
{
    if(pickupid == pick3)
    {
    new string[128];
    format(string, sizeof(string), "You found %d$ in the money bag!", DropMoney);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    GivePlayerCash(playerid,DropMoney);
    DestroyPickup(pickupid);
    }
    return 1;
}
This code is not tested! And i dosent know if the timer is working...
Reply


Messages In This Thread
Money Drop all the player money? - by steven_italy - 15.06.2009, 10:33
Re: Money Drop all the player money? - by robanswe - 15.06.2009, 12:16

Forum Jump:


Users browsing this thread: 2 Guest(s)