Please help me with this code
#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

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
Please help me with this code - by Mikkel_RE - 13.01.2013, 15:58
Re: Please help me with this code - by Mikkel_RE - 13.01.2013, 16:28
Re: Please help me with this code - by Mikkel_RE - 13.01.2013, 18:13
Re: Please help me with this code - by Infinity90 - 13.01.2013, 18:14
Re: Please help me with this code - by Mikkel_RE - 13.01.2013, 18:17
Re: Please help me with this code - by Mikkel_RE - 13.01.2013, 18:54

Forum Jump:


Users browsing this thread: 4 Guest(s)