shoot in RangeOfPoint
#1

if player shoot in RangeOfPoint(playerid,110.0,-1489.6556, 751.8200, 7.2345))

player get killed because shooted in this range point

help me to make it
PHP код:
public OnPlayerUpdate(playerid)
{
    if(!
IsPlayerConnected(playerid)) return 0;
    
// No weapons in interiors
    
if(GetPlayerInterior(playerid) != && GetPlayerWeapon(playerid) != 0) {
        
SetPlayerArmedWeapon(playerid,0); // fists
        
return 0// no syncing until they change their weapon
    
}
    if(
IsPlayerInRangeOfPoint(playerid,110.0,-1489.6556751.82007.2345))
    {
            if(!
GetPVarInt(playerid,"spawn")) // we are looking if there as variable with the name 'spawn' present , which we havent created yet
            
{
                
SetPVarInt(playerid,"spawn",1); // since there wasnt , we now create it so that the loop doesnt enter this again n again and create 'lag'
                
PlayAudioStreamForPlayer(playerid,"http://somafm.com/tags.pls",-1489.6556751.82007.2345,110.0,1);
            }
    }
    else 
// player is not in point range
    
{
        if(
GetPVarInt(playerid,"spawn")) // since we create it before and played the stream , it will be there
        
{
            
DeletePVar(playerid,"spawn");// delete the variable so that next time player goes in range the radio can be started again
               
StopAudioStreamForPlayer(playerid);
        }
    }
    return 
1;

Reply


Messages In This Thread
shoot in RangeOfPoint - by s3ek - 07.03.2015, 16:53
Re: shoot in RangeOfPoint - by ATGOggy - 07.03.2015, 16:59
Re: shoot in RangeOfPoint - by s3ek - 07.03.2015, 17:12
Re: shoot in RangeOfPoint - by Abagail - 07.03.2015, 17:25
Re: shoot in RangeOfPoint - by s3ek - 07.03.2015, 17:33
Respuesta: shoot in RangeOfPoint - by JuanStone - 07.03.2015, 17:33
Re: shoot in RangeOfPoint - by s3ek - 07.03.2015, 18:03
Re: shoot in RangeOfPoint - by s3ek - 07.03.2015, 18:38
Respuesta: shoot in RangeOfPoint - by JuanStone - 08.03.2015, 01:27
AW: Respuesta: shoot in RangeOfPoint - by BiosMarcel - 08.03.2015, 01:39

Forum Jump:


Users browsing this thread: 1 Guest(s)