doing something with ignoring playerid?
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/bam", true))
{
        SetPVarInt(playerid,"launcher",1);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(i==playerid) continue;
            GetPlayerPos(playerid,Xp, Yp,Zp);
            GetPlayerPos(i,Xt, Yt,Zt);
            if(IsPlayerInRangeOfPoint(i,TargetRange,Xp, Yp,Zp))
            {
                Vrocket[playerid] = CreateObject(ROCKETOBJECT, Xp, Yp,Zp+5,0.0,0.0,0.0,5.0); //
                MoveObject(Vrocket[playerid], Xt, Yt, Zt, ROCKETSPEED);
                return 1;            //So that there are not multiple rockets
            }
        }
}
thanks

so that will shoot at the 2nd closest player?
Reply


Messages In This Thread
doing something with ignoring playerid? - by thomas.. - 12.09.2010, 19:35
Re: doing something with ignoring playerid? - by Mauzen - 12.09.2010, 19:42
Re: doing something with ignoring playerid? - by thomas.. - 12.09.2010, 19:44
Re: doing something with ignoring playerid? - by thomas.. - 13.09.2010, 20:04

Forum Jump:


Users browsing this thread: 1 Guest(s)