script help
#1

how to make if player fire on teammate send massage hold your fire?
Reply
#2

Simple.
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart) {
    if(
GetPlayerTeam(playerid) == GetPlayerTeam(damagedid)) {
        
SendClientMessage(playerid,COLOR_RED,"Hold your fire");
    }
    return 
true;

If you are not using SetPlayerTeam change it into your variable. Not sure if its going to work with GetPlayerTeam as there is no team fire but yeah there u go an example
Reply
#3

and how to make if enemy player shoot him with sniper send massage sniper!!.
Reply
#4

Quote:
Originally Posted by GeneralAref
Посмотреть сообщение
and how to make if enemy player shoot him with sniper send massage sniper!!.
PHP код:
public OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart) {
    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;

Reply
#5

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)