public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 34 && bodypart == 9)
{
if(GOD[playerid] == 0 || GetPVarInt(playerid, "aGod") == 0)
{
GameTextForPlayer(issuerid,"~r~Headshot",2000,3) && GameTextForPlayer(playerid,"~r~Headshot",2000,3);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0) && PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
SetPlayerHealth(playerid, 0.0);
}
}
}
return 1;
}
if(GOD[playerid] != 1 || GetPVarInt(playerid, "aGod") != 1)
if(GOD[playerid] == 0 || GetPVarInt(playerid, "aGod") == 0)
if(GOD[playerid] == 0 || GetPVarInt(playerid, "aGod") == 1)
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID)
{
if(weaponid == 34 && bodypart == 9)
{
if(GOD[playerid] == 0 && GetPVarInt(playerid, "aGod") == 0)
{
GameTextForPlayer(issuerid,"~r~Headshot",2000,3) && GameTextForPlayer(playerid,"~r~Headshot",2000,3);
PlayerPlaySound(playerid, 17802, 0.0, 0.0, 0.0) && PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);
SetPlayerHealth(playerid, 0.0);
}
}
}
return 1;
}
You had to use && instead || so it should be like this:
PHP код:
|
Question
Shouldn't it be working with || or && (any of these <-)? Considering || (or) and && (and) |