server-sided health problem.
#3

Quote:
Originally Posted by MBilal
Посмотреть сообщение
Well i think zHealth[playerid] should be Float because the amount is Float

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid,bodypart)
also i don't know OnPlayerUpdate is too quick it will set your health or not better Update it under OnPlayerTakeDamage.

Код:
new Float:zHealth[MAX_PLAYERS];

  switch(weaponid)
                {
                    case 30: if(DoubleTap[issuerid] == 1) zHealth[playerid] -= 2*amount;
                    case 8: zHealth[playerid] -= 250;
                    case 33: zHealth[playerid] -= amount + 10;
                    case 24: zHealth[playerid] -= 80;
                    case 34: zHealth[playerid] -= amount + 25;
                    case 25: zHealth[playerid] -= amount + 6;
                    case 27: zHealth[playerid] -= amount + 55;
                    case 31: zHealth[playerid] -= amount + 79;
                    case 29: zHealth[playerid] -= amount + 63;
                    default: zHealth[playerid] -= amount;
                }
That didn't work either, thanks though.
Reply


Messages In This Thread
server-sided health problem. - by Crystallize - 26.05.2016, 17:55
Re: server-sided health problem. - by MBilal - 26.05.2016, 18:29
Re: server-sided health problem. - by Crystallize - 26.05.2016, 20:33
Re: server-sided health problem. - by IstuntmanI - 26.05.2016, 21:34
Re: server-sided health problem. - by Kimossab - 26.05.2016, 23:20
Re: server-sided health problem. - by Crystallize - 26.05.2016, 23:36

Forum Jump:


Users browsing this thread: 1 Guest(s)