29.04.2014, 07:59
PHP код:
warning 219: local variable "object" shadows a variable at a preceding level
PHP код:
if(killerid != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
new oldmoney = GetPlayerMoney(playerid);
GetPlayerPos(playerid, x, y, z);
ResetPlayerMoney(playerid);
//Only drop if the player has atleast $1
if(oldmoney > 2999)
{
new object = MONEY_STACK;
if(oldmoney >= 20000)
{
object = MONEY_BAG;
}
//Create the pickup & return the id
//Set the id to how much money was dropped
playerPickups[CreatePickup(object, 2, x, y, z, -1)] = oldmoney;
}
}