Drops on OnPlayerDeath problem
#1

Hi i have this on OnPlayerDeath, and i want that when a player dies he will drop the crack if he got more than 10 grams in his inventory, but when i die the object drops, but when i try to pick it up it says there's just 0 grams.

Код:
	if(PlayerInfo[playerid][pCrack] > 10)
	{
	    PlayerInfo[playerid][pCrack] = 10;
		for(new i = 0; i < sizeof(DropInfo); i++)
  	    {
  	        if(DropInfo[i][dx] == 0.0 && DropInfo[i][dy] == 0.0 && DropInfo[i][dz] == 0.0)
  	        {
  	            new Float:X,Float:Y,Float:Z;
  	            new rpos[2];
		    	GetPlayerPos(playerid, X, Y, Z);
  	            DropInfo[i][dType] = 2;
  	            DropInfo[i][dAmount][0] = PlayerInfo[playerid][pCrack] > 10;
  	            DropInfo[i][dx] = X;
  	            DropInfo[i][dy] = Y;
  	            DropInfo[i][dz] = Z;
  	            rpos[0] = random(4), rpos[1] = random(4);
  	            DropInfo[i][dWorld] = GetPlayerVirtualWorld(playerid);
  	            DropObject[i] = CreateObject(1575,  X + rpos[0], Y + rpos[1], Z, GetPlayerVirtualWorld(playerid));
  	        }
  	    }
  	}
Reply


Messages In This Thread
Drops on OnPlayerDeath problem - by Mikkel_RE - 02.12.2012, 17:55
Re: Drops on OnPlayerDeath problem - by Mikkel_RE - 02.12.2012, 19:20
Re: Drops on OnPlayerDeath problem - by TheArcher - 02.12.2012, 20:38
Re: Drops on OnPlayerDeath problem - by Mikkel_RE - 02.12.2012, 22:38
Re: Drops on OnPlayerDeath problem - by Mikkel_RE - 03.12.2012, 12:39
Re: Drops on OnPlayerDeath problem - by N0FeaR - 03.12.2012, 13:33
Re: Drops on OnPlayerDeath problem - by Mikkel_RE - 03.12.2012, 13:45
Re: Drops on OnPlayerDeath problem - by N0FeaR - 03.12.2012, 13:59

Forum Jump:


Users browsing this thread: 3 Guest(s)