20.03.2014, 22:40
i have this code about anti team attack but isn't working...
does anyone know how to fix this?
i want to do it when a player attacks hes team he will be like in god mode and dont get damage...
and about the setplayerwantedlevel is working but when a cop attacks a cop he gets wanted .. how do i make it to not get wanted when cop attacks a cop
does anyone know how to fix this?
i want to do it when a player attacks hes team he will be like in god mode and dont get damage...
and about the setplayerwantedlevel is working but when a cop attacks a cop he gets wanted .. how do i make it to not get wanted when cop attacks a cop
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
if(GetPlayerTeam(playerid) == Team_Cop)
{
GameTextForPlayer(issuerid,"~r~Don't attack your team mates!", 3000, 3);
}
if(GetPlayerTeam(playerid) == Team_grove)
{
GameTextForPlayer(issuerid,"~r~Don't attack your Grove Street Family !", 3000, 3);
}
if(GetPlayerTeam(playerid) == Team_ballas)
{
GameTextForPlayer(issuerid,"~r~Don't attack Ballas OG's they are your team mates !", 3000, 3);
}
if (GetPlayerWantedLevel(issuerid) == 0)
{
SetPlayerWantedLevel(issuerid, 3);
WantedLevelColor(issuerid);
}
if(issuerid != INVALID_PLAYER_ID)
{
new str[26];
format(str, sizeof(str),"-%.0f", amount);
SetPlayerChatBubble(playerid, str, 0xFF0000FF, 100.0, 2000);
PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
}
return 1;
}