[Ajuda] o meu sistema ta bugdo
#5

Quote:

public OnPlayerTakeDamage(playerid,issuerid,Float:amount, weaponid)
{
if(Lagduel[playerid] == false) return 1;
if(weaponid == 24) amount = 20;
SetPlayerScore(issuerid,GetPlayerScore(issuerid) + floatround(amount) / 10);
PlayerPlaySound(playerid,6401,0,0,0);
new Float:life;
GetPlayerHealth(playerid,life);
if((life - amount) <= 0)
{
Morto[playerid] = true;
SendDeathMessage(issuerid,playerid,weaponid);
DeadPlayer(playerid,issuerid,weaponid);
}
return 1;
}

public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
{
if(Aj[playerid] == false && GetPlayerSpecialAction(playerid) == 2) return SetPlayerHealth(playerid,0);
switch(weaponid)
{
case 24: amount = 32;
}
if(Morto[damagedid] == true) return 1;
if(Lagduel[damagedid] == true) return 1;
PlayerPlaySound(damagedid,6401,0,0,0);
new Float:Life, Float:Coleete, Floatano;
GetPlayerArmour(damagedid,Coleete);
GetPlayerHealth(damagedid,Life);
if(Coleete > 0)
{
if(amount > Coleete)
{
Dano = amount - Coleete;
Life = Life - Dano;
SetPlayerArmour(damagedid, 0.0);
SetPlayerHealth(damagedid, Life);
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
return 1;
}
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
if(Coleete < 1)
{
Life = Life - amount;
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 2);
SetPlayerHealth(damagedid, Life);
if(Life <= 0)
{
Morto[damagedid] = true;
SendDeathMessage(playerid,damagedid,weaponid);
DeadPlayer(damagedid,playerid,weaponid);
}
}
return 1;
}

achei esses 2 callback sera que e a take?
Reply


Messages In This Thread
o meu sistema ta bugdo - by HelderPT - 21.03.2018, 22:02
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:09
Re: o meu sistema ta bugdo - by JohnBlack - 21.03.2018, 22:10
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:12
Re: o meu sistema ta bugdo - by HelderPT - 21.03.2018, 22:16
Re: o meu sistema ta bugdo - by JohnBlack - 21.03.2018, 22:19
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:19
Re: o meu sistema ta bugdo - by Injury - 21.03.2018, 22:24
Re: o meu sistema ta bugdo - by Felipealves - 22.03.2018, 07:06
Re: o meu sistema ta bugdo - by HelderPT - 22.03.2018, 18:52

Forum Jump:


Users browsing this thread: 2 Guest(s)