public OnPlayerDeath(playerid, killerid, reason)
{
SetPlayerScore(killerid,GetPlayerScore(killerid) + 10);
if(killerid != INVALID_PLAYER_ID) // Se a causa da morte й um jogador.
{
GivePlayerMoney(killerid, 10);
}
GivePlayerMoney(playerid, -10);
if(Ct[playerid] == 1)
{
LimiteCT -= 1;
}
SalvarConta(playerid);
SalvarConta(killerid);
return 1;
}
public OnPlayerTakeDamage(playerid,issuerid,Float:amount,weaponid)
{
if(Lagduel[playerid] == false) return 1;
if(weaponid == 24) amount = 32;
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)
{
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0); // Ding Sound
if(Aj[playerid] == false && GetPlayerSpecialAction(playerid) == 2) return SetPlayerHealth(playerid,0);
switch(weaponid)
{
case 24: amount = 32;
case 9: amount = 10;
case 38: amount = 0;
}
if(Morto[damagedid] == true) return 1;
if(Lagduel[damagedid] == true) return 1;
PlayerPlaySound(damagedid,6401,0,0,0);
new Float:Life, Float:Coleete, Float:Dano;
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) / 10);
return 1;
}
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 10);
Coleete = Coleete - amount;
SetPlayerArmour(damagedid, Coleete);
}
if(Coleete < 1)
{
Life = Life - amount;
SetPlayerScore(playerid,GetPlayerScore(playerid) + floatround(amount) / 10);
SetPlayerHealth(damagedid, Life);
if(Life <= 0)
{
Morto[damagedid] = true;
SendDeathMessage(playerid,damagedid,weaponid);
DeadPlayer(damagedid,playerid,weaponid);
}
}
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID) // Se a causa da morte й um jogador.
{
GivePlayerMoney(killerid, 10);
SetPlayerScore(killerid,GetPlayerScore(killerid) + 10);
}
GivePlayerMoney(playerid, -10);
if(Ct[playerid] == 1)
{
LimiteCT -= 1;
}
SalvarConta(playerid);
SalvarConta(killerid);
return 1;
}
Vocк quer que ele receba 100 de score apenas quando matar ? Se й isso faзa o que eu fiz abaixo
Troque OnPlayerDeath por isto: pawn Код:
|