Money drops when player dies(help)
#1

Hi, i'm making that if you got more than 15k on you when you die you will loose the money, also if you got 20k on you you will drop 5k onto the ground, and spawn with 15k, but it doesnt work correctly(when you die you will get in debt like -54645646, something like that amount, and it wonly work once ) please help me to fix this code

I got this on OnPlayerDeath:
Код:
	new pdeathcash = GetMoney(playerid);
	for(new i = 0; i < sizeof(DropInfo); i++)
  	{
  	    if(DropInfo[i][dx] == 0.0 && DropInfo[i][dy] == 0.0 && DropInfo[i][dz] == 0.0 == pdeathcash > 15000)
  	    {
  	        new Float:X,Float:Y,Float:Z;
		    GetPlayerPos(playerid, X, Y, Z);
  	        DropInfo[i][dType] = 7;
  	        DropInfo[i][dAmount][0] = pdeathcash;
  	        DropInfo[i][dx] = X;
  	        DropInfo[i][dy] = Y;
  	        DropInfo[i][dz] = Z;
  	        DropInfo[i][dWorld] = GetPlayerVirtualWorld(playerid);
  	        GiveMoney(playerid,-(pdeathcash - 15000));
  	        DropObject[i] = CreateObject(1212, X, Y, Z-1, 0, 0, 0, 200.0, GetPlayerVirtualWorld(playerid));
		}
	}
Reply


Messages In This Thread
Money drops when player dies(help) - by Mikkel_RE - 14.01.2013, 10:55
Re: Money drops when player dies(help) - by Diorturato - 14.01.2013, 11:02
Re: Money drops when player dies(help) - by Mikkel_RE - 14.01.2013, 11:07
Re: Money drops when player dies(help) - by Diorturato - 14.01.2013, 11:11
Re: Money drops when player dies(help) - by Mikkel_RE - 14.01.2013, 11:24
Re: Money drops when player dies(help) - by Diorturato - 14.01.2013, 11:30
Re: Money drops when player dies(help) - by Mikkel_RE - 14.01.2013, 11:32
Re: Money drops when player dies(help) - by Diorturato - 14.01.2013, 11:38
Re: Money drops when player dies(help) - by Mikkel_RE - 14.01.2013, 11:41
Re: Money drops when player dies(help) - by Diorturato - 14.01.2013, 11:46

Forum Jump:


Users browsing this thread: 3 Guest(s)