18.12.2015, 08:00
how to make if player fire on teammate send massage hold your fire?
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) {
if(GetPlayerTeam(playerid) == GetPlayerTeam(damagedid)) {
SendClientMessage(playerid,COLOR_RED,"Hold your fire");
}
return true;
}
and how to make if enemy player shoot him with sniper send massage sniper!!.
|
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart) {
if(GetPlayerTeam(playerid) == GetPlayerTeam(damagedid)) {
SendClientMessage(playerid,COLOR_RED,"Hold your fire");
}
if(GetPlayerWeapon(playerid) == 34) {
SendClientMessage(damagedid,COLOR_RED,"You have been shot by a sniper");
}
return true;
}