public CheckHeadShot()
{
new index;
for(new playerid; playerid < maxPlayers; playerid++)
{
if(IsPlayerConnected(playerid))
{
index = GetPlayerAnimationIndex(playerid);
if(index == 1173 || index == 1175 || index == 1177 || index == 1178)
{
SetPVarInt(playerid, "Headshotted", 1);
SetPlayerHealth(playerid, 0);
}
}
}
return 1;
}
if(GetPVarInt(playerid, "Headshotted") == 1)
{
if (gTeam[playerid] == gTeam[killerid]) return 0;
SetPVarInt(playerid, "Headshotted", 0);
GameTextForPlayer(playerid, "~w~Head~r~shot!", 3000, 3);
GameTextForPlayer(killerid, "~w~Head~r~shot!", 3000, 3);
PlayerInfo[playerid][pHsReceived] ++;
PlayerInfo[killerid][pHsMade] ++;
}
public CheckHeadShot() { new index; for(new playerid; playerid < maxPlayers; playerid++) { if(IsPlayerConnected(playerid)) { index = GetPlayerAnimationIndex(playerid); if (gTeam[playerid] == gTeam[killerid]) { return 0; } else if(index == 1173 || index == 1175 || index == 1177 || index == 1178) { SetPVarInt(playerid, "Headshotted", 1); SetPlayerHealth(playerid, 0); } } } return 1; } if(GetPVarInt(playerid, "Headshotted") == 1) { // if (gTeam[playerid] == gTeam[killerid]) return 0; SetPVarInt(playerid, "Headshotted", 0); GameTextForPlayer(playerid, "~w~Head~r~shot!", 3000, 3); GameTextForPlayer(killerid, "~w~Head~r~shot!", 3000, 3); PlayerInfo[playerid][pHsReceived] ++; PlayerInfo[killerid][pHsMade] ++; }
Danyal i appreciate you helping him but you also need to tell him what you did so he can understand
|
No problem, i understand without any explanation.
Danyal thanks very much for help, i'll try now. Working or not you deserve +rep |