11.09.2014, 19:38
Vocк fez como disseram acima pelo menos?
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(GetPlayerVirtualWorld(playerid) > 2) return 1;//caso nгo estiver no VW 0, 1 ou 2, nгo vai executar o code abaixo...
if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) //weaponid == 34 <- sniper , bodypart == 9 <- cabeзa
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateExplosion(x, y, z, 12, 10.0);
SetPlayerHealth(playerid, 0.0);
GameTextForAll("~n~~n~~n~~n~~n~~n~~B~~H~HEAD ~W~~H~SHOT ~R~~H~BABY !", 5000, 3);
SendClientMessage(playerid,-1, "{F55454}[INFO]: Vocк acaba de levar 1 Headshot .");
ContarHeadShot[issuerid] ++;
}
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == 34) SetPlayerHealth(playerid, HP-49); //SniperRifle
return true;
}