Create flame and detect extinguish?
#1

hi, how can i make a flame when player enter a checkpoint and detect if he extinguish it?
Reply
#2

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}


https://sampwiki.blast.hk/wiki/CreateExplosion

If player is in the defined checkpoint, create it.

To my knowledge there is no way of detecting if a fire has been put out.
Reply
#3

http://www.youtube.com/watch?v=-meFjwblhdc#t=98 i mena some thing lik this.
Reply
#4

You will have to script it, like Dokins said.

Set a checkpoint: https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint

Put what to do when they enter the checkpoint here: https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint

Then these to functions may help you:
pawn Код:
public AddFire(Float:x, Float:y, Float:z)
{
    new slot = GetFlameSlot();
    if(slot == -1) {return slot;}
    Flame[slot][Flame_Exists] = 1;
    Flame[slot][Flame_pos][0] = x;
    Flame[slot][Flame_pos][1] = y;
    Flame[slot][Flame_pos][2] = z - Z_DIFFERENCE;
    Flame[slot][Flame_id] = CreateObject(18689, Flame[slot][Flame_pos][0], Flame[slot][Flame_pos][1], Flame[slot][Flame_pos][2], 0.0, 0.0, 0.0, 300.0);
    return slot;
}

public KillFire(id)
{
    DestroyObject(Flame[id][Flame_id]);
    Flame[id][Flame_Exists] = 0;
    Flame[id][Flame_pos][0] = 0.0;
    Flame[id][Flame_pos][1] = 0.0;
    Flame[id][Flame_pos][2] = 0.0;
    DestroyTheSmokeFromFlame(id);
}
Reply
#5

I've learned something new, too. Thanks Jake.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)