02.10.2009, 03:45
1: DropMoney System, the pickup is created when the player dies, but the pickup appears and it disappears after quickly.
2: Something happens similar to my system of houses, when I place a house for sale the blue pickup it should be destroyed and the green pickup created, but the green pickup but disappears after quickly.
3: DropWeapon System, after check the present weapons in all the player's slots would be created the pickups. But the first weapon found doesn't appear. Example: The player has a pistol, a tec and a shotgun, when he dies only tec and the shotgun is created.
Note 1: This worked perfectly in 0.2x
Note 2: I am using -1 for the new parameter VW of the function
I think the problem should be the same, therefore I will post part of the a code:
pawn Код:
stock DropMoney(playerid)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
if(GetPlayerMoney(playerid)>0)
{
for(new p,bool:found=false;p<MAX_DEATH_PICKUP && found==false;p++)
{
if(Pickup[p][p_created]==false)
{
Pickup[p][p_pickupid]=CreatePickup(1212,19,x+random(5),y+random(5),z-0.3,-1);
Pickup[p][p_money]=GetPlayerMoney(playerid);
Pickup[p][p_timetolive]=60;
Pickup[p][p_created]=true;
ResetPlayerMoney(playerid);
found=true;
}
}
}
}
Thanks
Sorry bad english