PLayershooting
#2

This is just an idea , I didn't test this code so I don't know if it works but you should get the idea of what you can use to make this script.

pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    new Float:X, Float:Y, Float:Z;
    for(new i; i<MAX_PLAYERS; i++) // Loop through all the players
    {
        if(IsACop(i)) // Search for players that are cops
        {
            GetPlayerPos(i, X, Y, Z); // Get the cop's position.       
        }
    }
    if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z)) // Check to see if the player who shot the weapon is near a cop
    {
        // Do something
       
    }
}
Reply


Messages In This Thread
PLayershooting - by STONEGOLD - 22.06.2015, 19:09
Re: PLayershooting - by rappy93 - 22.06.2015, 19:23
Re: PLayershooting - by M4D - 22.06.2015, 19:35

Forum Jump:


Users browsing this thread: 2 Guest(s)