My code should work.
#3

That's fixed.
It dosen't explode now when the object is "Moving" & IsInRange of target

pawn Код:
forward detectbomb(playerid);
public detectbomb(playerid)
{
    new
        Float:tx,
        Float:ty,
        Float:tz,
        Float:x,
        Float:y,
        Float:z;

    for(new targetid = 0; targetid < MAX_PLAYERS; targetid++)
    {
        if(!IsPlayerConnected(targetid) || targetid == playerid || !IsPlayerInAnyVehicle(targetid)) continue;
        GetPlayerPos(targetid, tx, ty, tz);
        GetObjectPos(gRocketObj[playerid], x, y, z);
        if(IsPlayerInRangeOfPoint(targetid, 3.0, x, y, z))
        {
            CreateExplosion(tx, ty, tz, 11, 5.0);
            DestroyObject(gRocketObj[playerid]);
            KillTimer(detecttimer[playerid]);
        }
        else if(!IsPlayerInRangeOfPoint(targetid,3.0, x, y, z))
        {

        }
    }
    return 1;
}
It should explode.
Reply


Messages In This Thread
My code should work. - by Rudy_ - 28.07.2012, 20:58
Re: My code should work. - by milanosie - 28.07.2012, 21:31
Re: My code should work. - by Rudy_ - 29.07.2012, 09:57
Re: My code should work. - by Rudy_ - 29.07.2012, 11:34

Forum Jump:


Users browsing this thread: 1 Guest(s)