IsPlayerInRangeOfPoint Problem
#1

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);
        }
    }
}
Reply
#2

You didnt kill anyone :S
Reply
#3

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

btw. Problem is fixed.
Reply
#4

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


Forum Jump:


Users browsing this thread: