SA-MP Forums Archive
IsPlayerInRangeOfPoint Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IsPlayerInRangeOfPoint Problem (/showthread.php?tid=140303)



IsPlayerInRangeOfPoint Problem - Headshot1108 - 08.04.2010

Hello,
i don't know why this won't work <.<

pawn Код:
if(strcmp(cmd,"/airstrike1",true)==0)
  {
  if(Airstrike == 1) return SendClientMessage(playerid,0xFF0000AA,"Please Wait");
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    Airstrike = 1;
    Adromada = CreateObject(14553,x-55,y,z+75,0.000000,0.000000,90);
    MoveObject(Adromada,x+250,y,z+75,29);
    SetTimerEx("AirstrikeGo",5000,false,"fffd",x,y,z,Airstrike);
    SetTimerEx("AirStrikeKill",5000,false,"dfff",playerid,x,y,z);
    return 1;
  }


pawn Код:
forward AirStrikeKill(playerid,Float:x,Float:y,Float:z);
public AirStrikeKill(playerid,Float:x,Float:y,Float:z)
{
    new string[128];
    foreach(Player, i)
    {
        if(IsPlayerInRangeOfPoint(i,5,x,y,z))
        {
        GetPlayerName(i,playername,MAX_PLAYER_NAME);
        format(string,sizeof(string),"You killed %s with your Airstrike.",playername);
        SendClientMessageToAll(_COLOR_LIME,string);
        }
    }
}



Re: IsPlayerInRangeOfPoint Problem - Thrarod - 08.04.2010

You didnt kill anyone :S


Re: IsPlayerInRangeOfPoint Problem - Headshot1108 - 08.04.2010

lol its an timer message with an airstrike.. its logical, thats why its called 'Airstrike'.

btw. Problem is fixed.


Re: IsPlayerInRangeOfPoint Problem - Fj0rtizFredde - 08.04.2010

I think you forgot to get the players position in the public AirStrikeKill :P